]> git.baikalelectronics.ru Git - kernel.git/commit
staging/lustre/lnet: Fix potential uninitialized variable warning
authorOleg Drokin <green@linuxhacker.ru>
Tue, 12 Aug 2014 02:18:29 +0000 (22:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:18 +0000 (12:23 -0700)
commit108633ed40690d1bff62e3402c40e0c1096d14bc
treed7d156b0a9ed3e79a0455181b356bbb7e8b9b6cc
parente78ceb5905a37422fe0e97e1eb9b2581fba2272b
staging/lustre/lnet: Fix potential uninitialized variable warning

Greg reports that with one of the patches in his queue
there's now an unused variable warning in lnet_parse_ip2nets
for ipaddrs variable.
Apparently the warning is a false positive as in all cases where
lnet_ipaddr_enumerate can return without setting ipaddrs to something
a negative return value is returned that is then checked
before we actually use ipaddrs.

Assign ipaddrs to NULL to quiet this.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/config.c