Skip to content

Commit

Permalink
wan: wanxl: add pci_disable_device in case of error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Saurabh Sengar authored and David S. Miller committed Dec 14, 2015
1 parent 7772f77 commit 7e074af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wan/wanxl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7e074af

Please sign in to comment.