From: Markus Pargmann <mpa@pengutronix.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
"Tony Lindgren" <tony@atomide.com>,
"Wolfram Sang" <wsa@the-dreams.de>,
"Steven Rostedt" <rostedt@goodmis.org>,
linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
"Markus Pargmann" <mpa@pengutronix.de>
Subject: [PATCH v3 2/7] net: cpsw: Add missing return value
Date: Sat, 16 Aug 2014 17:18:30 +0200 [thread overview]
Message-ID: <1408202315-20006-3-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1408202315-20006-1-git-send-email-mpa@pengutronix.de>
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>
---
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 ff380dac6629..43b2777f8e04 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2043,6 +2043,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.0.1
next prev parent reply other threads:[~2014-08-16 15:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 15:18 [PATCH v3 0/7] net: cpsw: Support for am335x chip MACIDs Markus Pargmann
2014-08-16 15:18 ` [PATCH v3 1/7] DT doc: net: cpsw mac-address is optional Markus Pargmann
2014-08-16 15:18 ` Markus Pargmann [this message]
2014-08-16 15:18 ` [PATCH v3 3/7] net: cpsw: header, Add missing include Markus Pargmann
2014-08-16 15:18 ` [PATCH v3 4/7] net: cpsw: Replace pr_err by dev_err Markus Pargmann
2014-08-16 15:18 ` [PATCH v3 5/7] net: cpsw: Add am33xx MACID readout Markus Pargmann
2014-08-16 16:46 ` Wolfram Sang
2014-08-18 6:58 ` Markus Pargmann
2014-08-16 16:53 ` Wolfram Sang
2014-08-18 7:03 ` Markus Pargmann
2014-08-18 18:24 ` Mugunthan V N
2014-08-18 19:41 ` Steven Rostedt
2014-08-18 19:58 ` Mugunthan V N
2014-08-18 20:57 ` Steven Rostedt
2014-08-18 22:50 ` Javier Martinez Canillas
2014-08-19 8:50 ` Markus Pargmann
2014-08-19 16:37 ` Mugunthan V N
2014-08-16 15:18 ` [PATCH v3 6/7] am33xx: define syscon control module device node Markus Pargmann
2014-08-16 15:18 ` [PATCH v3 7/7] arm: dts: am33xx, Add syscon phandle to cpsw node Markus Pargmann
[not found] ` <1408202315-20006-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-08-16 16:55 ` [PATCH v3 0/7] net: cpsw: Support for am335x chip MACIDs Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408202315-20006-3-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=bcousson@baylibre.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tony@atomide.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).