Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dd7903e authored by Sunil Mushran's avatar Sunil Mushran Committed by Linus Torvalds
Browse files

fs/ocfs2/cluster/tcp.c: fix possible null pointer dereferences



Fix some possible null pointer dereferences that were detected by the
static code analyser, smatch.

Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Reported-by: default avatarGuozhonghua <guozhonghua@h3c.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7e9b7937
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -543,6 +543,7 @@ static void o2net_set_nn_state(struct o2net_node *nn,
	}

	if (was_valid && !valid) {
		if (old_sc)
			printk(KERN_NOTICE "o2net: No longer connected to "
				SC_NODEF_FMT "\n", SC_NODEF_ARGS(old_sc));
		o2net_complete_nodes_nsw(nn);
@@ -1695,12 +1696,11 @@ static void o2net_start_connect(struct work_struct *work)
		ret = 0;

out:
	if (ret) {
	if (ret && sc) {
		printk(KERN_NOTICE "o2net: Connect attempt to " SC_NODEF_FMT
		       " failed with errno %d\n", SC_NODEF_ARGS(sc), ret);
		/* 0 err so that another will be queued and attempted
		 * from set_nn_state */
		if (sc)
		o2net_ensure_shutdown(nn, sc, 0);
	}
	if (sc)