diff options
author | Dmitriy Monakhov <dmonakhov@openvz.org> | 2007-01-27 03:00:03 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-30 09:36:02 -0500 |
commit | 90afd0e574a1a739aeb62e30d556ebf0289389e5 (patch) | |
tree | fd882a0475ce51a35200a114a2688eed9403170f /drivers/net | |
parent | 00576e93805bd4f2dd2649e354726dee872d1e8a (diff) |
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 <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/b44.c | 15 |
1 files changed, 13 insertions, 2 deletions
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) | |||
2320 | { | 2320 | { |
2321 | struct net_device *dev = pci_get_drvdata(pdev); | 2321 | struct net_device *dev = pci_get_drvdata(pdev); |
2322 | struct b44 *bp = netdev_priv(dev); | 2322 | struct b44 *bp = netdev_priv(dev); |
2323 | int rc = 0; | ||
2323 | 2324 | ||
2324 | pci_restore_state(pdev); | 2325 | pci_restore_state(pdev); |
2325 | pci_enable_device(pdev); | 2326 | rc = pci_enable_device(pdev); |
2327 | if (rc) { | ||
2328 | printk(KERN_ERR PFX "%s: pci_enable_device failed\n", | ||
2329 | dev->name); | ||
2330 | return rc; | ||
2331 | } | ||
2332 | |||
2326 | pci_set_master(pdev); | 2333 | pci_set_master(pdev); |
2327 | 2334 | ||
2328 | if (!netif_running(dev)) | 2335 | if (!netif_running(dev)) |
2329 | return 0; | 2336 | return 0; |
2330 | 2337 | ||
2331 | if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) | 2338 | rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); |
2339 | if (rc) { | ||
2332 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | 2340 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); |
2341 | pci_disable_device(pdev); | ||
2342 | return rc; | ||
2343 | } | ||
2333 | 2344 | ||
2334 | spin_lock_irq(&bp->lock); | 2345 | spin_lock_irq(&bp->lock); |
2335 | 2346 | ||