summaryrefslogtreecommitdiffstats
path: root/net/ethtool
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index f8bca08e727e..1797a0a90019 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -35,7 +35,7 @@ int ethnl_ops_begin(struct net_device *dev)
int ret;
if (!dev)
- return 0;
+ return -ENODEV;
if (dev->dev.parent)
pm_runtime_get_sync(dev->dev.parent);
@@ -61,7 +61,7 @@ err:
void ethnl_ops_complete(struct net_device *dev)
{
- if (dev && dev->ethtool_ops->complete)
+ if (dev->ethtool_ops->complete)
dev->ethtool_ops->complete(dev);
if (dev->dev.parent)