summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2020-11-04 20:54:04 -0500
committerJakub Kicinski <kuba@kernel.org>2020-11-07 12:18:41 -0800
commit419a38cecf14f137c84e76e5fc5b46cac48f34c9 (patch)
tree123721174d7e73fe783afddd50c5cd4e0798faa6 /drivers/net/macvlan.c
parentea8146c6845799142aa4ee2660741c215e340cdf (diff)
net: macvlan: remove redundant initialization in macvlan_dev_netpoll_setup
The initialization for err with 0 seems useless, as it is soon updated with -ENOMEM. So, we can remove it. Changes since v1: -Keep -ENOMEM still. Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/1604541244-3241-1-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index dd960209da94..d9b6c44a5911 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1096,7 +1096,7 @@ static int macvlan_dev_netpoll_setup(struct net_device *dev, struct netpoll_info
struct macvlan_dev *vlan = netdev_priv(dev);
struct net_device *real_dev = vlan->lowerdev;
struct netpoll *netpoll;
- int err = 0;
+ int err;
netpoll = kzalloc(sizeof(*netpoll), GFP_KERNEL);
err = -ENOMEM;