diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-16 09:24:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-16 09:36:22 +0100 |
commit | 3fc0b7d3e0a4d37e4c60c2232df4500187a07232 (patch) | |
tree | ebb36eb80a822ff952fd99b7570da9c8de5c6e26 | |
parent | 0f45b23aedf91ae66890d13320c5147c15013a0c (diff) | |
download | op-kernel-dev-3fc0b7d3e0a4d37e4c60c2232df4500187a07232.zip op-kernel-dev-3fc0b7d3e0a4d37e4c60c2232df4500187a07232.tar.gz |
staging: lustre: lnet: fix build warning in module.c
With the latest patches from Neil, we are now getting a build warning:
drivers/staging/lustre/lnet/selftest/module.c: In function ‘lnet_selftest_init’:
drivers/staging/lustre/lnet/selftest/module.c:98:10: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return rc;
^~
So fix this up by giving a default error value to rc.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c index aa6bfd5..d860c50 100644 --- a/drivers/staging/lustre/lnet/selftest/module.c +++ b/drivers/staging/lustre/lnet/selftest/module.c @@ -89,7 +89,7 @@ static int lnet_selftest_init(void) { int nscheds; - int rc; + int rc = -ENOMEM; int i; lst_serial_wq = alloc_ordered_workqueue("lst_s", 0); |