From: Dmitriy Monakhov Date: Sat, 27 Jan 2007 08:00:03 +0000 (-0800) Subject: Broadcom 4400 resume small fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=90afd0e574a1a739aeb62e30d556ebf0289389e5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Broadcom 4400 resume small fix Some issues in b44_resume(). - Return value of pci_enable_device() was ignored. - If request_irq() has failed we have to just disable device and exit. Signed-off-by: Dmitriy Monakhov Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 26b9295cb9b7..303a8d94ad4b 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -2320,16 +2320,27 @@ static int b44_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct b44 *bp = netdev_priv(dev); + int rc = 0; pci_restore_state(pdev); - pci_enable_device(pdev); + rc = pci_enable_device(pdev); + if (rc) { + printk(KERN_ERR PFX "%s: pci_enable_device failed\n", + dev->name); + return rc; + } + pci_set_master(pdev); if (!netif_running(dev)) return 0; - if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) + rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); + if (rc) { printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); + pci_disable_device(pdev); + return rc; + } spin_lock_irq(&bp->lock);