Skip to contentSkip to conversation

drivers/pci/msi.c: fix a check after use

PATCH Applied Adrian Bunk 2 participants 2 messages Mar 27, 2005 – Mar 28, 2005 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/pci/msi.c: fix a check after use

This patch fixes a check after use found by the Coverity checker.

drivers/pci/msi.c renamed from drivers/pci/msi.c.old +3 -1
@@ -703,12 +703,14 @@
  **/
 int pci_enable_msi(struct pci_dev* dev)
 {
-	int pos, temp = dev->irq, status = -EINVAL;
+	int pos, temp, status = -EINVAL;
 	u16 control;
 
 	if (!pci_msi_enable || !dev)
  		return status;
 
+	temp = dev->irq;
+
 	if ((status = msi_init()) < 0)
 		return status;