* [PATCH] greth: fall through to common return statement on error
@ 2010-02-25 23:50 Simon Horman
2010-02-26 12:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2010-02-25 23:50 UTC (permalink / raw)
To: netdev; +Cc: Kristoffer Glembo, David S. Miller, Jiri Pirko, Denis Kirjanov
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] greth: fall through to common return statement on error
2010-02-25 23:50 [PATCH] greth: fall through to common return statement on error Simon Horman
@ 2010-02-26 12:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-02-26 12:20 UTC (permalink / raw)
To: horms; +Cc: netdev, kristoffer, jpirko, kirjanov
From: Simon Horman <horms@verge.net.au>
Date: Fri, 26 Feb 2010 10:50:19 +1100
> 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>
Looks fine, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-26 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 23:50 [PATCH] greth: fall through to common return statement on error Simon Horman
2010-02-26 12:20 ` David Miller
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).