[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411973599-18908-3-git-send-email-mpa@pengutronix.de>
Date: Mon, 29 Sep 2014 08:53:14 +0200
From: Markus Pargmann <mpa@...gutronix.de>
To: "David S. Miller" <davem@...emloft.net>
Cc: BenoƮt Cousson <bcousson@...libre.com>,
Tony Lindgren <tony@...mide.com>,
Wolfram Sang <wsa@...-dreams.de>,
Steven Rostedt <rostedt@...dmis.org>,
Mugunthan V N <mugunthanvnm@...com>,
linux-omap@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
kernel@...gutronix.de, Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH RESEND v6 2/7] 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@...gutronix.de>
Reviewed-by: Wolfram Sang <wsa@...-dreams.de>
---
drivers/net/ethernet/ti/cpsw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 999fb72688d2..f09b4639ad31 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2063,6 +2063,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;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists