Skip to content

Commit

Permalink
ethtool: ethnl_set_linkmodes: remove redundant null check
Browse files Browse the repository at this point in the history
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: Gaurav Singh <gaurav1086@gmail.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gaurav Singh authored and David S. Miller committed Aug 3, 2020
1 parent 9aba6c5 commit 71fed0b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ethtool/linkmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info)

ret = __ethtool_get_link_ksettings(dev, &ksettings);
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;
}

Expand Down

0 comments on commit 71fed0b

Please sign in to comment.