diff options
author | Shivasharan S <shivasharan.srikanteshwara@broadcom.com> | 2018-01-05 05:27:36 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-10 23:25:13 -0500 |
commit | e05ee4e986d173791e83f4370a120bd8ff691b7d (patch) | |
tree | 9df219033105c1bb1794aa1097f4ae356987501c /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | 08640e81dc33e02405b909bb289fcf91de663443 (diff) | |
download | op-kernel-dev-e05ee4e986d173791e83f4370a120bd8ff691b7d.zip op-kernel-dev-e05ee4e986d173791e83f4370a120bd8ff691b7d.tar.gz |
scsi: megaraid_sas: zero out IOC INIT and stream detection memory
Memory allocated for IOC_INIT command and stream detection array are not
zero'd before using. Use kzalloc instead of kmalloc to zero out the
memory allocated.
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index cc54bdb..ed106cb 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5387,7 +5387,7 @@ static int megasas_init_fw(struct megasas_instance *instance) } for (i = 0; i < MAX_LOGICAL_DRIVES_EXT; ++i) { fusion->stream_detect_by_ld[i] = - kmalloc(sizeof(struct LD_STREAM_DETECT), + kzalloc(sizeof(struct LD_STREAM_DETECT), GFP_KERNEL); if (!fusion->stream_detect_by_ld[i]) { dev_err(&instance->pdev->dev, |