Skip to contentSkip to conversation

ocfs2: remove unneeded NULL check

PATCH New Dan Carpenter 1 participant 1 message Nov 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: remove unneeded NULL check

In 1faf289454b9 ('ocfs2_dlm: disallow a domain join if node maps mismatch') then we introduced a new earlier NULL check so this one is not needed. Also static checkers complain because we dereference it first and then check for NULL.

fs/ocfs2/dlm/dlmdomain.c +1 -1
index 02d315f..50a59d2 100644
@@ -877,7 +877,7 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
 	 * to be put in someone's domain map.
 	 * Also, explicitly disallow joining at certain troublesome
 	 * times (ie. during recovery). */
-	if (dlm && dlm->dlm_state != DLM_CTXT_LEAVING) {
+	if (dlm->dlm_state != DLM_CTXT_LEAVING) {
 		int bit = query->node_idx;
 		spin_lock(&dlm->spinlock);