summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorSaurabh Sengar <saurabh.truth@gmail.com>2015-12-12 00:58:19 +0530
committerDavid S. Miller <davem@davemloft.net>2015-12-14 16:21:58 -0500
commit7e074af2273a6e3115ff7c35529081ab52f8a9e9 (patch)
tree40d0a596891c90ae3aef798f7341b382af3364cf /drivers/net/wan
parent7772f773dc08899410ce89c47b923961c5cfbf25 (diff)
downloadtalos-obmc-linux-7e074af2273a6e3115ff7c35529081ab52f8a9e9.tar.gz
talos-obmc-linux-7e074af2273a6e3115ff7c35529081ab52f8a9e9.zip
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 <saurabh.truth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/wanxl.c1
1 files changed, 1 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud