]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
atmel: Add missing call to pci_disable_device()
authorYueHaibing <yuehaibing@huawei.com>
Wed, 23 May 2018 10:34:45 +0000 (18:34 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 29 May 2018 07:19:00 +0000 (10:19 +0300)
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>
drivers/net/wireless/atmel/atmel_pci.c

index bcf1f274a2513a9e9da82232aa114738af012e5b..30df58a41a83652f3f430fed9dc207d63bf2c79a 100644 (file)
@@ -61,8 +61,10 @@ static int atmel_pci_probe(struct pci_dev *pdev,
        dev = init_atmel_card(pdev->irq, pdev->resource[1].start,
                              ATMEL_FW_TYPE_506,
                              &pdev->dev, NULL, NULL);
-       if (!dev)
+       if (!dev) {
+               pci_disable_device(pdev);
                return -ENODEV;
+       }
 
        pci_set_drvdata(pdev, dev);
        return 0;