From: Saurabh Sengar Date: Fri, 11 Dec 2015 19:28:19 +0000 (+0530) Subject: wan: wanxl: add pci_disable_device in case of error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e074af2273a6e3115ff7c35529081ab52f8a9e9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git wan: wanxl: add pci_disable_device in case of error If there is 'no suitable DMA available' error, device should be disabled before returning Signed-off-by: Saurabh Sengar Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index e73f13857846..a20d688d2595 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -586,6 +586,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(28)) || pci_set_dma_mask(pdev, DMA_BIT_MASK(28))) { pr_err("No usable DMA configuration\n"); + pci_disable_device(pdev); return -EIO; }