diff mbox

greth: fall through to common return statement on error

Message ID 20100225235019.GA26133@verge.net.au
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Simon Horman Feb. 25, 2010, 11:50 p.m. UTC
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().

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 26, 2010, 12:20 p.m. UTC | #1
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }