Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gaurav Singh and committed by
David S. Miller
71fed0bc 9aba6c5b

+1 -2
+1 -2
net/ethtool/linkmodes.c
··· 421 421 422 422 ret = __ethtool_get_link_ksettings(dev, &ksettings); 423 423 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"); 426 425 goto out_ops; 427 426 } 428 427