ipvlan: Remove NULL check before dev_{put, hold}
authorYang Li <yang.lee@linux.alibaba.com>
Thu, 11 May 2023 07:21:19 +0000 (15:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2023 07:56:57 +0000 (08:56 +0100)
commit0fae8847563b0c990f8cffcb8d3668fbcaca4919
treeab34a6a03a683072ed95429512c7b801b0146a55
parent48c0db05a1bf60067cdee062a6bfad6db5c1f602
ipvlan: Remove NULL check before dev_{put, hold}

The call netdev_{put, hold} of dev_{put, hold} will check NULL,
so there is no need to check before using dev_{put, hold},
remove it to silence the warning:

./drivers/net/ipvlan/ipvlan_core.c:559:3-11: WARNING: NULL check before dev_{put, hold} functions is not needed.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4930
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c