myri10ge: remove unneeded variable
authorDing Xiang <dingxiang@cmss.chinamobile.com>
Wed, 31 Jul 2019 08:53:46 +0000 (16:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Jul 2019 15:44:00 +0000 (08:44 -0700)
"error" is unneeded,just return 0

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/myricom/myri10ge/myri10ge.c

index 99eaadba555fb34635ec42a8395722bf96a5c9ae..61fe92719982a5faaf64a6e5a9b2bf34fef01fb4 100644 (file)
@@ -3037,7 +3037,6 @@ static int myri10ge_set_mac_address(struct net_device *dev, void *addr)
 static int myri10ge_change_mtu(struct net_device *dev, int new_mtu)
 {
        struct myri10ge_priv *mgp = netdev_priv(dev);
-       int error = 0;
 
        netdev_info(dev, "changing mtu from %d to %d\n", dev->mtu, new_mtu);
        if (mgp->running) {
@@ -3049,7 +3048,7 @@ static int myri10ge_change_mtu(struct net_device *dev, int new_mtu)
        } else
                dev->mtu = new_mtu;
 
-       return error;
+       return 0;
 }
 
 /*