[PATCH] Broadcom 4400 resume small fix

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

 



Return value  of 'pci_enable_device' was ignored in b44_resume().
We can't ingore it because it can fail.

Signed-off-by: Dmitriy Monakhov <[email protected]>
-------
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 5eb2ec6..63de31b 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2315,9 +2315,15 @@ static int b44_resume(struct pci_dev *pd
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct b44 *bp = netdev_priv(dev);
+	int err;
 
 	pci_restore_state(pdev);
-	pci_enable_device(pdev);
+	err = pci_enable_device(pdev);
+	if (err) {
+		dev_err(&pdev->dev, "Cannot enable PCI device, "
+		       "aborting.\n");
+		return err;
+	}
 	pci_set_master(pdev);
 
 	if (!netif_running(dev))

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux