Thread (32 messages) flat view 32 messages, 3 authors, 2017-02-19

Re: [PATCH net-next 05/13] net: ethernet: aquantia: Superfluous initialization of "err".

From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Date: 2017-02-15 21:01:43

On 15.02.2017 21:01, Pavel Belous wrote:
quoted hunk ↗ jump to hunk
From: Pavel Belous <redacted>

Fixed superfluous initialization of err.

Signed-off-by: Pavel Belous <redacted>
---
 drivers/net/ethernet/aquantia/atlantic/aq_main.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index f7513cb..68c19d3 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -87,14 +87,8 @@ static int aq_ndev_close(struct net_device *ndev)
 static int aq_ndev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct aq_nic_s *aq_nic = netdev_priv(ndev);
-	int err = 0;
-
-	err = aq_nic_xmit(aq_nic, skb);
-	if (err < 0)
-		goto err_exit;

-err_exit:
-	return err;
+	return aq_nic_xmit(aq_nic, skb);
 }

 static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu)
Just a nitpick: Now that ndev_start_xmit() is only an empty wrapper for
aq_nic_xmit() you can toss it completely and call aq_nic_xmit directly.

Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>

Regards,
Lino
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help