Skip to content

Commit 6402a57

Browse files
XidianGeneraldavem330
authored andcommitted
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>
1 parent f620e4f commit 6402a57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/realtek/8139too.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,10 @@ static struct net_device *rtl8139_init_board(struct pci_dev *pdev)
787787
if (rc)
788788
goto err_out;
789789

790+
disable_dev_on_err = 1;
790791
rc = pci_request_regions (pdev, DRV_NAME);
791792
if (rc)
792793
goto err_out;
793-
disable_dev_on_err = 1;
794794

795795
pci_set_master (pdev);
796796

0 commit comments

Comments
 (0)