[PATCH] bcm43xx-softmac: check returned value from pci_enable_device
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 28 Sep 2006 05:10:55 +0000 (00:10 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 17 Oct 2006 00:09:47 +0000 (20:09 -0400)
Linus's tree now has a configuration option that prints a warning whenever
the returned value of any routine is ignored. This patch fixes the only such
warning for bcm43xx.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/bcm43xx/bcm43xx_main.c

index 0f047d42158f88f549002976f05df87962d2cd90..7776b5c42ac761f5d8bc03e02ac55088eb9de209 100644 (file)
@@ -4207,7 +4207,11 @@ static int bcm43xx_resume(struct pci_dev *pdev)
        dprintk(KERN_INFO PFX "Resuming...\n");
 
        pci_set_power_state(pdev, 0);
-       pci_enable_device(pdev);
+       err = pci_enable_device(pdev);
+       if (err) {
+               printk(KERN_ERR PFX "Failure with pci_enable_device!\n");
+               return err;
+       }
        pci_restore_state(pdev);
 
        bcm43xx_chipset_attach(bcm);