diff options
author | Yajun Deng <yajun.deng@linux.dev> | 2021-08-05 14:55:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-05 15:27:50 +0300 |
commit | 1160dfa178eb848327e9dec39960a735f4dc1685 (patch) | |
tree | b9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/ieee802154/socket.c | |
parent | a85b99ab6abb583e051d266c2138647daa5c0ecc (diff) | |
download | linux-1160dfa178eb848327e9dec39960a735f4dc1685.tar.xz |
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/ieee802154/socket.c')
-rw-r--r-- | net/ieee802154/socket.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c index f5077de3619e..90233efa1f6b 100644 --- a/net/ieee802154/socket.c +++ b/net/ieee802154/socket.c @@ -41,8 +41,7 @@ ieee802154_get_dev(struct net *net, const struct ieee802154_addr *addr) ieee802154_devaddr_to_raw(hwaddr, addr->extended_addr); rcu_read_lock(); dev = dev_getbyhwaddr_rcu(net, ARPHRD_IEEE802154, hwaddr); - if (dev) - dev_hold(dev); + dev_hold(dev); rcu_read_unlock(); break; case IEEE802154_ADDR_SHORT: |