[PATCH] pch_dma: fix error return code in pch_dma_probe()

From: Wei Yongjun
Date: Tue Jul 16 2013 - 20:35:09 EST


From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Fix to return -ENODEV when no proper base address found error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
drivers/dma/pch_dma.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 237f1d5..956314d 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -860,6 +860,7 @@ static int pch_dma_probe(struct pci_dev *pdev,

if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
dev_err(&pdev->dev, "Cannot find proper base address\n");
+ err = -ENODEV;
goto err_disable_pdev;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/