summaryrefslogtreecommitdiffstats
path: root/drivers/net/natsemi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@sirena.org.uk>2007-10-10 17:11:12 +0100
committerJeff Garzik <jeff@garzik.org>2007-10-15 14:20:45 -0400
commita8a935dae5de65a8f5a5371a58ad2aa73a0ea2da (patch)
treefd7a42f26b59fd286a5ddde6a0a84977dde0f07b /drivers/net/natsemi.c
parent0e5d5442cbe3399d789d6a75c6e3a0db37f846f5 (diff)
downloadlinux-a8a935dae5de65a8f5a5371a58ad2aa73a0ea2da.tar.gz
linux-a8a935dae5de65a8f5a5371a58ad2aa73a0ea2da.tar.bz2
linux-a8a935dae5de65a8f5a5371a58ad2aa73a0ea2da.zip
natsemi: Check return value for pci_enable_device()
pci_enable_device() is __must_check so do that in natsemi_resume(). Signed-off-by: Mark Brown <broonie@sirena.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/natsemi.c')
-rw-r--r--drivers/net/natsemi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index b881786eebd4..50e1ec67ef9c 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -3314,13 +3314,19 @@ static int natsemi_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
struct netdev_private *np = netdev_priv(dev);
+ int ret = 0;
rtnl_lock();
if (netif_device_present(dev))
goto out;
if (netif_running(dev)) {
BUG_ON(!np->hands_off);
- pci_enable_device(pdev);
+ ret = pci_enable_device(pdev);
+ if (ret < 0) {
+ dev_err(&pdev->dev,
+ "pci_enable_device() failed: %d\n", ret);
+ goto out;
+ }
/* pci_power_on(pdev); */
napi_enable(&np->napi);
@@ -3340,7 +3346,7 @@ static int natsemi_resume (struct pci_dev *pdev)
netif_device_attach(dev);
out:
rtnl_unlock();
- return 0;
+ return ret;
}
#endif /* CONFIG_PM */