diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-05-23 18:34:45 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-29 10:19:00 +0300 |
commit | 88027c8ff0a3f87d5d06d53ee25a41b90d8bccec (patch) | |
tree | 420aa3d1763cf38a6bb48c7eadf4dc448b6e7fed | |
parent | 0a9f8f0a1ba9688a9ff5f6b83c4cc1eecd2fc9f2 (diff) | |
download | talos-op-linux-88027c8ff0a3f87d5d06d53ee25a41b90d8bccec.tar.gz talos-op-linux-88027c8ff0a3f87d5d06d53ee25a41b90d8bccec.zip |
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>
-rw-r--r-- | drivers/net/wireless/atmel/atmel_pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/atmel/atmel_pci.c b/drivers/net/wireless/atmel/atmel_pci.c index bcf1f274a251..30df58a41a83 100644 --- a/drivers/net/wireless/atmel/atmel_pci.c +++ b/drivers/net/wireless/atmel/atmel_pci.c @@ -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; |