[PATCH] mptbase: Fix ignored return value warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

This patch fixes the following warning:

drivers/message/fusion/mptbase.c:1526: warning: ignoring return value of
`pci_enable_device', declared with attribute warn_unused_result

Signed-off-by: Leann Ogasawara <ogasawara@xxxxxxxx>

---

Index: linux-2.6.19-rc2-git4/drivers/message/fusion/mptbase.c
===================================================================
--- linux-2.6.19-rc2-git4.orig/drivers/message/fusion/mptbase.c	2006-10-20 09:54:14.000000000 -0700
+++ linux-2.6.19-rc2-git4/drivers/message/fusion/mptbase.c	2006-10-20 13:43:15.000000000 -0700
@@ -1516,6 +1516,7 @@
 	MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
 	u32 device_state = pdev->current_state;
 	int recovery_state;
+	int err;
 
 	printk(MYIOC_s_INFO_FMT
 	"pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n",
@@ -1523,7 +1524,11 @@
 
 	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev);
-	pci_enable_device(pdev);
+	err = pci_enable_device(pdev);
+	if (err) {
+		printk(KERN_ERR "mptbase: Failed to enable PCI device.\n");
+		return err;
+	}
 
 	/* enable interrupts */
 	CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM);


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux