aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethtool/linkinfo.c
diff options
context:
space:
mode:
authorSimon Horman <horms@kernel.org>2024-07-31 10:15:28 +0100
committerJakub Kicinski <kuba@kernel.org>2024-08-01 09:03:52 -0700
commit743ff02152bc46bb4a2f2a49ec891c87eba6ab5b (patch)
tree7ddcce35b195f1073cc8f037ce40882812584c9c /net/ethtool/linkinfo.c
parentRDS: IB: Remove unused declarations (diff)
downloadlinux-743ff02152bc46bb4a2f2a49ec891c87eba6ab5b.tar.gz
linux-743ff02152bc46bb4a2f2a49ec891c87eba6ab5b.zip
ethtool: Don't check for NULL info in prepare_data callbacks
Since commit f946270d05c2 ("ethtool: netlink: always pass genl_info to .prepare_data") the info argument of prepare_data callbacks is never NULL. Remove checks present in callback implementations. Link: https://lore.kernel.org/netdev/20240703121237.3f8b9125@kernel.org/ Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240731-prepare_data-null-check-v1-1-627f2320678f@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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);