netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: netdev@vger.kernel.org
Cc: Kristoffer Glembo <kristoffer@gaisler.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jiri Pirko <jpirko@redhat.com>,
	Denis Kirjanov <kirjanov@gmail.com>
Subject: [PATCH] greth: fall through to common return statement on error
Date: Fri, 26 Feb 2010 10:50:19 +1100	[thread overview]
Message-ID: <20100225235019.GA26133@verge.net.au> (raw)

There doesn't seem to be any reason to explicitly return
NETDEV_TX_OK as err is set to NETDEV_TX_OK in all cases that
reach this point.

Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

Cosmetic change brought about by curiosity as to weather returning
NETDEV_TX_OK on these error conditions is correct. I have similar
curiosity relating to greth_start_xmit().

Index: net-next-2.6/drivers/net/greth.c
===================================================================
--- net-next-2.6.orig/drivers/net/greth.c	2010-02-26 10:42:35.000000000 +1100
+++ net-next-2.6/drivers/net/greth.c	2010-02-26 10:42:55.000000000 +1100
@@ -556,8 +556,6 @@ map_error:
 	if (net_ratelimit())
 		dev_warn(greth->dev, "Could not create TX DMA mapping\n");
 	dev_kfree_skb(skb);
-	return NETDEV_TX_OK;
-
 out:
 	return err;
 }

             reply	other threads:[~2010-02-25 23:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 23:50 Simon Horman [this message]
2010-02-26 12:20 ` [PATCH] greth: fall through to common return statement on error 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=20100225235019.GA26133@verge.net.au \
    --to=horms@verge.net.au \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=kirjanov@gmail.com \
    --cc=kristoffer@gaisler.com \
    --cc=netdev@vger.kernel.org \
    /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).