From 35bf020bd8ab41849871645d8fa83c86cddfe7eb Mon Sep 17 00:00:00 2001 From: Yang Li Date: Mon, 13 Jun 2022 09:43:21 +0800 Subject: scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Fix following coccicheck error: ./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is NULL but dereferenced. Link: https://lore.kernel.org/r/20220613014321.107045-1-yang.lee@linux.alibaba.com Fixes: a75fcb0912a5 ("scsi: target: iscsi: Extract auth functions") Reported-by: Abaci Robot Reviewed-by: Mike Christie Signed-off-by: Yang Li Signed-off-by: Martin K. Petersen --- drivers/target/iscsi/iscsi_target_nego.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/target') diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 9ce35a59962b..fb93a1173954 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -827,8 +827,7 @@ static bool iscsi_conn_auth_required(struct iscsit_conn *conn) */ se_nacl = conn->sess->se_sess->se_node_acl; if (!se_nacl) { - pr_debug("Unknown ACL %s is trying to connect\n", - se_nacl->initiatorname); + pr_debug("Unknown ACL is trying to connect\n"); return true; } -- cgit v1.2.3