summaryrefslogtreecommitdiffstats
path: root/net/netrom/nr_loopback.c
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2021-08-05 13:55:27 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-05 14:27:50 +0200
commit1160dfa178eb848327e9dec39960a735f4dc1685 (patch)
treeb9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/netrom/nr_loopback.c
parentRevert "wwan: mhi: Fix build." (diff)
downloadlinux-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.c3
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);