diff options
author | Yajun Deng <yajun.deng@linux.dev> | 2021-08-05 13:55:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-05 14:27:50 +0200 |
commit | 1160dfa178eb848327e9dec39960a735f4dc1685 (patch) | |
tree | b9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/netrom/nr_loopback.c | |
parent | Revert "wwan: mhi: Fix build." (diff) | |
download | linux-1160dfa178eb848327e9dec39960a735f4dc1685.tar.xz linux-1160dfa178eb848327e9dec39960a735f4dc1685.zip |
net: Remove redundant if statements
The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/nr_loopback.c')
-rw-r--r-- | net/netrom/nr_loopback.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index a880dd33e901..511819fbfa67 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c @@ -59,8 +59,7 @@ static void nr_loopback_timer(struct timer_list *unused) if (dev == NULL || nr_rx_frame(skb, dev) == 0) kfree_skb(skb); - if (dev != NULL) - dev_put(dev); + dev_put(dev); if (!skb_queue_empty(&loopback_queue) && !nr_loopback_running()) mod_timer(&loopback_timer, jiffies + 10); |