Commit 7e074af2 authored by Saurabh Sengar's avatar Saurabh Sengar Committed by David S. Miller

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: default avatarSaurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7772f773
...@@ -586,6 +586,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, ...@@ -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)) || if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(28)) ||
pci_set_dma_mask(pdev, DMA_BIT_MASK(28))) { pci_set_dma_mask(pdev, DMA_BIT_MASK(28))) {
pr_err("No usable DMA configuration\n"); pr_err("No usable DMA configuration\n");
pci_disable_device(pdev);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment