diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-08-14 09:25:52 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 18:59:10 +0200 |
commit | de37ad13aca160f51ad1fd70fab553452e829b2b (patch) | |
tree | 91636b8813a94c56947570d31b131bdfd978fa8d /net/ieee802154/header_ops.c | |
parent | f2118bfd0259822d9aef4c4bcee2202ebdbe66fb (diff) | |
download | linux-stable-de37ad13aca160f51ad1fd70fab553452e829b2b.tar.gz linux-stable-de37ad13aca160f51ad1fd70fab553452e829b2b.tar.bz2 linux-stable-de37ad13aca160f51ad1fd70fab553452e829b2b.zip |
powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
[ Upstream commit 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d ]
We see warnings such as:
kernel/futex.c: In function 'do_futex':
kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized]
return oldval == cmparg;
^
kernel/futex.c:1651:6: note: 'oldval' was declared here
int oldval, ret;
^
This is because arch_futex_atomic_op_inuser() only sets *oval if ret
is 0 and GCC doesn't see that it will only use it when ret is 0.
Anyway, the non-zero ret path is an error path that won't suffer from
setting *oval, and as *oval is a local var in futex_atomic_op_inuser()
it will have no impact.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: reword change log slightly]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/86b72f0c134367b214910b27b9a6dd3321af93bb.1565774657.git.christophe.leroy@c-s.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ieee802154/header_ops.c')
0 files changed, 0 insertions, 0 deletions