summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/xgbe/xgbe-main.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-22 17:35:30 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-27 00:21:59 +0300
commit675a6ceefc31a952bd5a29b6433c2c2d8c595af3 (patch)
tree64ca41ec63cd9f327db24a8b38ef3c00637651ba /drivers/net/ethernet/amd/xgbe/xgbe-main.c
parent0942170f32e1e9076f9a5f350250b8ec59ac04fa (diff)
downloadlinux-675a6ceefc31a952bd5a29b6433c2c2d8c595af3.tar.xz
amd-xgbe: Fix error return code in xgbe_probe()
Fix to return error code -ENODEV from the DMA is not supported error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-main.c')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
index 667e1209a2f5..6997f1110ece 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
@@ -613,6 +613,7 @@ static int xgbe_probe(struct platform_device *pdev)
attr = device_get_dma_attr(dev);
if (attr == DEV_DMA_NOT_SUPPORTED) {
dev_err(dev, "DMA is not supported");
+ ret = -ENODEV;
goto err_io;
}
pdata->coherent = (attr == DEV_DMA_COHERENT);