[PATCH] greth: fall through to common return statement on error

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Simon Horman
Date: Thursday, February 25, 2010 - 4:50 pm

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;
 }
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] greth: fall through to common return statement on ..., Simon Horman, (Thu Feb 25, 4:50 pm)