Skip to content

Commit 71fed0b

Browse files
gaurav1086davem330
authored andcommitted
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 <[email protected]> Reviewed-by: Michal Kubecek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9aba6c5 commit 71fed0b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ethtool/linkmodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info)
421421

422422
ret = __ethtool_get_link_ksettings(dev, &ksettings);
423423
if (ret < 0) {
424-
if (info)
425-
GENL_SET_ERR_MSG(info, "failed to retrieve link settings");
424+
GENL_SET_ERR_MSG(info, "failed to retrieve link settings");
426425
goto out_ops;
427426
}
428427

0 commit comments

Comments
 (0)