diff mbox series

[-next] scsi: qla2xxx: Remove useless set memory to zero use memset()

Message ID 20190323132753.22508-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit 25ea6b19db54a76879e388ff4dfd67be48890f0d
Headers show
Series [-next] scsi: qla2xxx: Remove useless set memory to zero use memset() | expand

Commit Message

Yue Haibing March 23, 2019, 1:27 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Martin K. Petersen April 4, 2019, 3:41 a.m. UTC | #1
Yue,

> The memory return by kzalloc() has already be set to zero, so remove
> useless memset(0).

Applied to 5.2/scsi-queue, thanks.
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 3b81a2a..90da4b9 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -8852,7 +8852,6 @@  struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos,
 			    "Failed to allocate memory for queue pair.\n");
 			return NULL;
 		}
-		memset(qpair, 0, sizeof(struct qla_qpair));
 
 		qpair->hw = vha->hw;
 		qpair->vha = vha;