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: Gaurav Singh <gaurav1086@gmail.com> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
This commit is contained in:
parent
e2fd4f9fe3
commit
afd248c5e1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue