diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/natsemi.c | 10 |
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) | |||
3314 | { | 3314 | { |
3315 | struct net_device *dev = pci_get_drvdata (pdev); | 3315 | struct net_device *dev = pci_get_drvdata (pdev); |
3316 | struct netdev_private *np = netdev_priv(dev); | 3316 | struct netdev_private *np = netdev_priv(dev); |
3317 | int ret = 0; | ||
3317 | 3318 | ||
3318 | rtnl_lock(); | 3319 | rtnl_lock(); |
3319 | if (netif_device_present(dev)) | 3320 | if (netif_device_present(dev)) |
3320 | goto out; | 3321 | goto out; |
3321 | if (netif_running(dev)) { | 3322 | if (netif_running(dev)) { |
3322 | BUG_ON(!np->hands_off); | 3323 | BUG_ON(!np->hands_off); |
3323 | pci_enable_device(pdev); | 3324 | ret = pci_enable_device(pdev); |
3325 | if (ret < 0) { | ||
3326 | dev_err(&pdev->dev, | ||
3327 | "pci_enable_device() failed: %d\n", ret); | ||
3328 | goto out; | ||
3329 | } | ||
3324 | /* pci_power_on(pdev); */ | 3330 | /* pci_power_on(pdev); */ |
3325 | 3331 | ||
3326 | napi_enable(&np->napi); | 3332 | napi_enable(&np->napi); |
@@ -3340,7 +3346,7 @@ static int natsemi_resume (struct pci_dev *pdev) | |||
3340 | netif_device_attach(dev); | 3346 | netif_device_attach(dev); |
3341 | out: | 3347 | out: |
3342 | rtnl_unlock(); | 3348 | rtnl_unlock(); |
3343 | return 0; | 3349 | return ret; |
3344 | } | 3350 | } |
3345 | 3351 | ||
3346 | #endif /* CONFIG_PM */ | 3352 | #endif /* CONFIG_PM */ |