提交 7e074af2 编写于 作者: S Saurabh Sengar 提交者: 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: NSaurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7772f773
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册