summaryrefslogtreecommitdiff
path: root/net/ethtool/linkinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool/linkinfo.c')
-rw-r--r--net/ethtool/linkinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethtool/linkinfo.c b/net/ethtool/linkinfo.c
index 5c317d23787b..30b8ce275159 100644
--- a/net/ethtool/linkinfo.c
+++ b/net/ethtool/linkinfo.c
@@ -35,7 +35,7 @@ static int linkinfo_prepare_data(const struct ethnl_req_info *req_base,
if (ret < 0)
return ret;
ret = __ethtool_get_link_ksettings(dev, &data->ksettings);
- if (ret < 0 && info)
+ if (ret < 0)
GENL_SET_ERR_MSG(info, "failed to retrieve link settings");
ethnl_ops_complete(dev);