summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw.c
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-09-29 08:53:14 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-30 01:30:42 -0400
commit4d507dffe766b8e29f29d17ae8e0611b5638286e (patch)
treeca7f336afa883fb5fa1b719b7f0ada859490101a /drivers/net/ethernet/ti/cpsw.c
parente4a9839b8548cf2668c6ccf961f30bd565e8333f (diff)
net: cpsw: Add missing return value
ret is set 0 at this point, so jumping to that error label would result in a return value of 0. Set ret to -ENOMEM to return a proper error value. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 45ba50e4eae..187c6ef5488 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2123,6 +2123,7 @@ static int cpsw_probe(struct platform_device *pdev)
priv->irq_enabled = true;
if (!priv->cpts) {
dev_err(&pdev->dev, "error allocating cpts\n");
+ ret = -ENOMEM;
goto clean_ndev_ret;
}