ocfs2: o2net: silence uninitialized variable warning
Smatch complains that, if o2net_tx_can_proceed() returns false, then "sc" and "ret" are uninialized or maybe we are re-using the data from previous iteration. I do not know if we can hit this bug in real life but checking the return value is harmless and we may as well silence the static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d9510a20f8
commit
e6d9f86d6b
@ -1016,7 +1016,8 @@ void o2net_fill_node_map(unsigned long *map, unsigned bytes)
|
|||||||
|
|
||||||
memset(map, 0, bytes);
|
memset(map, 0, bytes);
|
||||||
for (node = 0; node < O2NM_MAX_NODES; ++node) {
|
for (node = 0; node < O2NM_MAX_NODES; ++node) {
|
||||||
o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret);
|
if (!o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret))
|
||||||
|
continue;
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
set_bit(node, map);
|
set_bit(node, map);
|
||||||
sc_put(sc);
|
sc_put(sc);
|
||||||
|
Loading…
Reference in New Issue
Block a user