]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: return error from ethnl_ops_begin if dev is NULL
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 5 Aug 2021 19:08:22 +0000 (21:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Aug 2021 09:39:04 +0000 (10:39 +0100)
commit1c830632a407bacf9089620f7a1a1425ad507c37
tree517fa8847d7ffd2d803fe3b11b8404d93661b78c
parentd0697081f89bb6c53cedf206578a22275ed9bb03
ethtool: return error from ethnl_ops_begin if dev is NULL

Julian reported that after ed35a28b49f2 Coverity complains about a
missing check whether dev is NULL in ethnl_ops_complete().
There doesn't seem to be any valid case where dev could be NULL when
calling ethnl_ops_begin(), therefore return an error if dev is NULL.

Fixes: ed35a28b49f2 ("ethtool: runtime-resume netdev parent in ethnl_ops_begin")
Reported-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c