From: Markus Pargmann Date: Mon, 29 Sep 2014 06:53:14 +0000 (+0200) Subject: net: cpsw: Add missing return value X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4d507dffe766b8e29f29d17ae8e0611b5638286e;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Wolfram Sang Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 45ba50e4eaec..187c6ef54885 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; }