summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/altera
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-22 14:28:38 +0000
committerDavid S. Miller <davem@davemloft.net>2016-10-26 17:21:59 -0400
commita24a9d7aca2daef4ac87d1ef00ef21586ec6affe (patch)
tree652e4ed0d4dba46af222c5189c757d590717532d /drivers/net/ethernet/altera
parent68497a87c4f4f918cbbdbae88652e796c75e11bd (diff)
downloadlinux-a24a9d7aca2daef4ac87d1ef00ef21586ec6affe.tar.bz2
net: eth: altera: Fix error return code in altera_tse_probe()
Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/altera')
-rw-r--r--drivers/net/ethernet/altera/altera_tse_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index cc9787e33acf..8e9208434262 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1329,11 +1329,13 @@ static int altera_tse_probe(struct platform_device *pdev)
if (upper_32_bits(priv->rxdescmem_busaddr)) {
dev_dbg(priv->device,
"SGDMA bus addresses greater than 32-bits\n");
+ ret = -EINVAL;
goto err_free_netdev;
}
if (upper_32_bits(priv->txdescmem_busaddr)) {
dev_dbg(priv->device,
"SGDMA bus addresses greater than 32-bits\n");
+ ret = -EINVAL;
goto err_free_netdev;
}
} else if (priv->dmaops &&