]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: eth: altera: Fix error return code in altera_tse_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 22 Oct 2016 14:28:38 +0000 (14:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2016 21:21:59 +0000 (17:21 -0400)
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>
drivers/net/ethernet/altera/altera_tse_main.c

index cc9787e33acfd8d710ffe928ff680e57307f9b1f..8e92084342622732ecdcd4d8e4b164551906c74e 100644 (file)
@@ -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 &&