summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek/8139too.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@163.com>2014-12-22 01:28:52 +0100
committerDavid S. Miller <davem@davemloft.net>2014-12-22 22:31:58 +0100
commit6402a577f4688053e98c1ffda1f4a6a59684ba81 (patch)
tree93392c3f7aeb03a7fb17cffa879f7f7fc10a3890 /drivers/net/ethernet/realtek/8139too.c
parentnet: ethernet: stmicro: stmmac: drop owner assignment from platform_drivers (diff)
downloadlinux-6402a577f4688053e98c1ffda1f4a6a59684ba81.tar.xz
linux-6402a577f4688053e98c1ffda1f4a6a59684ba81.zip
8139too: Fix the lack of pci_disable_device
For linux-3.18.0 When pci_request_regions is failed in rtl8139_init_board, pci_disable_device is not called to disable the device which are enabled by pci_enable_device, because of disable_dev_on_err is not assigned 1. This patch fix this problem. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek/8139too.c')
-rw-r--r--drivers/net/ethernet/realtek/8139too.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
index 6d0b9dfac313..d4b0a29c6aa7 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -787,10 +787,10 @@ static struct net_device *rtl8139_init_board(struct pci_dev *pdev)
if (rc)
goto err_out;
+ disable_dev_on_err = 1;
rc = pci_request_regions (pdev, DRV_NAME);
if (rc)
goto err_out;
- disable_dev_on_err = 1;
pci_set_master (pdev);