Commit 71fed0bc authored by Gaurav Singh's avatar Gaurav Singh Committed by David S. Miller

ethtool: ethnl_set_linkmodes: remove redundant null check

info cannot be NULL here since its being accessed earlier
in the function: nlmsg_parse(info->nlhdr...). Remove this
redundant NULL check.
Signed-off-by: default avatarGaurav Singh <gaurav1086@gmail.com>
Reviewed-by: default avatarMichal Kubecek <mkubecek@suse.cz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9aba6c5b
...@@ -421,7 +421,6 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info) ...@@ -421,7 +421,6 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info)
ret = __ethtool_get_link_ksettings(dev, &ksettings); ret = __ethtool_get_link_ksettings(dev, &ksettings);
if (ret < 0) { if (ret < 0) {
if (info)
GENL_SET_ERR_MSG(info, "failed to retrieve link settings"); GENL_SET_ERR_MSG(info, "failed to retrieve link settings");
goto out_ops; goto out_ops;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment