From: Wei Yongjun Date: Sat, 22 Oct 2016 14:35:30 +0000 (+0000) Subject: amd-xgbe: Fix error return code in xgbe_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=675a6ceefc31a952bd5a29b6433c2c2d8c595af3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Tom Lendacky Signed-off-by: David S. Miller --- 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);