mirror of https://gitee.com/openkylin/linux.git
atmel: Add missing call to pci_disable_device()
add pci_disable_device in error handling while init_atmel_card failed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
0a9f8f0a1b
commit
88027c8ff0
|
@ -61,8 +61,10 @@ static int atmel_pci_probe(struct pci_dev *pdev,
|
||||||
dev = init_atmel_card(pdev->irq, pdev->resource[1].start,
|
dev = init_atmel_card(pdev->irq, pdev->resource[1].start,
|
||||||
ATMEL_FW_TYPE_506,
|
ATMEL_FW_TYPE_506,
|
||||||
&pdev->dev, NULL, NULL);
|
&pdev->dev, NULL, NULL);
|
||||||
if (!dev)
|
if (!dev) {
|
||||||
|
pci_disable_device(pdev);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
pci_set_drvdata(pdev, dev);
|
pci_set_drvdata(pdev, dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue