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

Commit 8a914f32 authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Martin K. Petersen
Browse files

scsi: target/iscsi: fix possible condition with no effect (if == else)



Fix the following warning reported by coccicheck:

drivers/target/iscsi/iscsi_target_nego.c:175:6-8: WARNING: possible
condition with no effect (if == else)

Signed-off-by: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: default avatarDavid Disseldorp <ddiss@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 32877947
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -160,21 +160,10 @@ static u32 iscsi_handle_authentication(

	if (strstr("None", authtype))
		return 1;
#ifdef CANSRP
	else if (strstr("SRP", authtype))
		return srp_main_loop(conn, auth, in_buf, out_buf,
				&in_length, out_length);
#endif
	else if (strstr("CHAP", authtype))
		return chap_main_loop(conn, auth, in_buf, out_buf,
				&in_length, out_length);
	else if (strstr("SPKM1", authtype))
		return 2;
	else if (strstr("SPKM2", authtype))
		return 2;
	else if (strstr("KRB5", authtype))
		return 2;
	else
	/* SRP, SPKM1, SPKM2 and KRB5 are unsupported */
	return 2;
}