netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	"Mugunthan V N" <mugunthanvnm@ti.com>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	kernel@pengutronix.de, "Markus Pargmann" <mpa@pengutronix.de>
Subject: [PATCH RESEND v6 2/7] net: cpsw: Add missing return value
Date: Mon, 29 Sep 2014 08:53:14 +0200	[thread overview]
Message-ID: <1411973599-18908-3-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1411973599-18908-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>
Reviewed-by: Wolfram Sang <wsa@the-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


  parent reply	other threads:[~2014-09-29  6:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29  6:53 [PATCH RESEND v6 0/7] net: cpsw: Support for am335x chip MACIDs Markus Pargmann
2014-09-29  6:53 ` [PATCH RESEND v6 1/7] DT doc: net: cpsw mac-address is optional Markus Pargmann
2014-09-29  6:53 ` Markus Pargmann [this message]
2014-09-29  6:53 ` [PATCH RESEND v6 3/7] net: cpsw: header, Add missing include Markus Pargmann
2014-09-29  6:53 ` [PATCH RESEND v6 4/7] net: cpsw: Replace pr_err by dev_err Markus Pargmann
     [not found] ` <1411973599-18908-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-09-29  6:53   ` [PATCH RESEND v6 5/7] net: cpsw: Add am33xx MACID readout Markus Pargmann
2014-09-29  6:53 ` [PATCH RESEND v6 6/7] am33xx: define syscon control module device node Markus Pargmann
2014-09-29  6:53 ` [PATCH RESEND v6 7/7] arm: dts: am33xx, Add syscon phandle to cpsw node Markus Pargmann
2014-09-29  8:51 ` [PATCH RESEND v6 0/7] net: cpsw: Support for am335x chip MACIDs Mugunthan V N
2014-09-30  5:31 ` David Miller

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=1411973599-18908-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=mugunthanvnm@ti.com \
    --cc=netdev@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).