]> 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)
commitba234c5fb2056928ad5081f596196ff2653a6fb9
tree517fa8847d7ffd2d803fe3b11b8404d93661b78c
parent207d82eceaf775534d8bcc112efa50c51d07590f
ethtool: return error from ethnl_ops_begin if dev is NULL

Julian reported that after 29962bafb08b 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: 29962bafb08b ("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