Message ID | 1419208132-23657-1-git-send-email-baijiaju1990@163.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Jia-Ju Bai <baijiaju1990@163.com> Date: Mon, 22 Dec 2014 08:28:52 +0800 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c index 007b38c..49bbcf3 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c @@ -783,10 +783,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);
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> --- drivers/net/ethernet/realtek/8139too.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)