diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2021-12-02 08:53:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-02 14:07:38 +0100 |
commit | 0c4789460e8cc6a84f10a06ba9410a31432550e1 (patch) | |
tree | 73f0d52171e686ab33600820fd046aaea4c0d577 /drivers/net/ipvlan/ipvlan_main.c | |
parent | net: lan966x: Fix builds for lan966x driver (diff) | |
download | linux-0c4789460e8cc6a84f10a06ba9410a31432550e1.tar.xz linux-0c4789460e8cc6a84f10a06ba9410a31432550e1.zip |
ipvlan: Remove redundant if statements
The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 20da0b2bd246..696e245f6d00 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -100,8 +100,7 @@ static void ipvlan_port_destroy(struct net_device *dev) netdev_rx_handler_unregister(dev); cancel_work_sync(&port->wq); while ((skb = __skb_dequeue(&port->backlog)) != NULL) { - if (skb->dev) - dev_put(skb->dev); + dev_put(skb->dev); kfree_skb(skb); } ida_destroy(&port->ida); |