summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorWenchao Hao <haowenchao@huawei.com>2022-03-17 16:01:16 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-30 05:01:28 +0200
commitebfe3e0c5e805da3dd692bb120cd6269b7c19b80 (patch)
tree42461c6a88eea4ebd3e13f4b99d0ddec169a3d92 /drivers/scsi/libiscsi.c
parentscsi: mpt3sas: Fix use after free in _scsih_expander_node_remove() (diff)
downloadlinux-ebfe3e0c5e805da3dd692bb120cd6269b7c19b80.tar.xz
linux-ebfe3e0c5e805da3dd692bb120cd6269b7c19b80.zip
scsi: libiscsi: Remove unnecessary memset() in iscsi_conn_setup()
iscsi_cls_conn is alloced by kzalloc(), the whole iscsi_cls_conn is zero filled already including the dd_data. So it is unnecessary to call memset again. Link: https://lore.kernel.org/r/20220317150116.194140-1-haowenchao@huawei.com Reviewed-by: Wu Bo <wubo40@huawei.com> Reviewed-by: Lee Duncan <lduncan@suse.com> Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Wenchao Hao <haowenchao@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index d09926e6c8a8..cf4211c6500d 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -3045,7 +3045,6 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
if (!cls_conn)
return NULL;
conn = cls_conn->dd_data;
- memset(conn, 0, sizeof(*conn) + dd_size);
conn->dd_data = cls_conn->dd_data + sizeof(*conn);
conn->session = session;