summaryrefslogtreecommitdiff
path: root/drivers/target
diff options
context:
space:
mode:
authorHariprasad Kelam <hariprasad.kelam@gmail.com>2019-05-28 04:21:52 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-19 02:46:23 +0300
commit8a914f32e2dfaff7f23002502ba64a2abb2a4a50 (patch)
treef603088e89482b744f5ad5b985abb7a0ab418ed2 /drivers/target
parent32877947b7a806bb655a830d9cab709a3aebd49b (diff)
downloadlinux-8a914f32e2dfaff7f23002502ba64a2abb2a4a50.tar.xz
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: Hariprasad Kelam <hariprasad.kelam@gmail.com> Reviewed-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_nego.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c
index 8a5e8d17a942..92ce2fd05fdd 100644
--- a/drivers/target/iscsi/iscsi_target_nego.c
+++ b/drivers/target/iscsi/iscsi_target_nego.c
@@ -160,22 +160,11 @@ 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
- return 2;
+ /* SRP, SPKM1, SPKM2 and KRB5 are unsupported */
+ return 2;
}
static void iscsi_remove_failed_auth_entry(struct iscsi_conn *conn)