summaryrefslogtreecommitdiff
path: root/drivers/scsi/snic
diff options
context:
space:
mode:
authorSabyasachi Gupta <sabyasachi.linux@gmail.com>2018-11-15 19:34:04 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-08 05:30:32 +0300
commit7250d12d73195adbf9c3eb003b4331ce36eed038 (patch)
treed19297084ddce9dbf3b368117c211fce2b9c6a35 /drivers/scsi/snic
parente3f230c066cd50010844871d62aed346dbe7c9d7 (diff)
downloadlinux-7250d12d73195adbf9c3eb003b4331ce36eed038.tar.xz
scsi: snic: Use vzalloc
Replaced vmalloc + memset with vzalloc Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Acked-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/snic')
-rw-r--r--drivers/scsi/snic/snic_trc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
index fc60c933d6c0..458eaba24c78 100644
--- a/drivers/scsi/snic/snic_trc.c
+++ b/drivers/scsi/snic/snic_trc.c
@@ -126,7 +126,7 @@ snic_trc_init(void)
int tbuf_sz = 0, ret;
tbuf_sz = (snic_trace_max_pages * PAGE_SIZE);
- tbuf = vmalloc(tbuf_sz);
+ tbuf = vzalloc(tbuf_sz);
if (!tbuf) {
SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz);
SNIC_ERR("Trace Facility not enabled.\n");
@@ -135,7 +135,6 @@ snic_trc_init(void)
return ret;
}
- memset(tbuf, 0, tbuf_sz);
trc->buf = (struct snic_trc_data *) tbuf;
spin_lock_init(&trc->lock);