提交 1c76b490 编写于 作者: J Jia-Ju Bai 提交者: Kalle Valo

rtl818x_pci: Disable pci device in error handling code

When pci_request_regions in rtl8180_probe fails, pci_disable_device is not
called to disable the device which is enabled by pci_enbale_device.

This patch fixes the problem by adding a new lable in error handling code.
Signed-off-by: NJia-Ju Bai <baijiaju1990@163.com>
Acked-by: NAndrea Merello <andrea.merello@gmail.com>
Signed-off-by: NJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 96838d61
......@@ -1736,7 +1736,7 @@ static int rtl8180_probe(struct pci_dev *pdev,
if (err) {
printk(KERN_ERR "%s (rtl8180): Cannot obtain PCI resources\n",
pci_name(pdev));
return err;
goto err_disable_dev;
}
io_addr = pci_resource_start(pdev, 0);
......@@ -1938,6 +1938,8 @@ static int rtl8180_probe(struct pci_dev *pdev,
err_free_reg:
pci_release_regions(pdev);
err_disable_dev:
pci_disable_device(pdev);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册