summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/tcp.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-02-10 14:09:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 14:30:29 -0800
commite6d9f86d6b80dec23fd0e90bab114e642dac483e (patch)
treec793703efd0aae6b49afef6c39917d719e2dbc0e /fs/ocfs2/cluster/tcp.c
parentd9510a20f81467b48cd005e86e17b5288990bc71 (diff)
downloadop-kernel-dev-e6d9f86d6b80dec23fd0e90bab114e642dac483e.zip
op-kernel-dev-e6d9f86d6b80dec23fd0e90bab114e642dac483e.tar.gz
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>
Diffstat (limited to 'fs/ocfs2/cluster/tcp.c')
-rw-r--r--fs/ocfs2/cluster/tcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 2e355e0..56c403a 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1016,7 +1016,8 @@ void o2net_fill_node_map(unsigned long *map, unsigned bytes)
memset(map, 0, bytes);
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) {
set_bit(node, map);
sc_put(sc);
OpenPOWER on IntegriCloud