]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: silence uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 18 Feb 2017 21:34:59 +0000 (00:34 +0300)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 21 Feb 2017 15:53:36 +0000 (10:53 -0500)
commitcfd1cd2101dc7e4a37eae7befdc1e1f65e6a510b
treec59140035afb7f89906f920b488952a3d6a1913e
parent726b25c651f9add0b7bd0d571cd3e5f059466058
sunrpc: silence uninitialized variable warning

kstrtouint() can return a couple different error codes so the check for
"ret == -EINVAL" is wrong and static analysis tools correctly complain
that we can use "num" without initializing it.  It's not super harmful
because we check the bounds.  But it's also easy enough to fix.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtsock.c