summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-05-18 16:20:18 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-21 23:31:17 +0300
commit2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2 (patch)
treefeff7a30d35738b2f6265eb8acf9e074398c046a /drivers/scsi/qedf
parentb592d66235f5f7c2191cc0348468b343c17c3977 (diff)
downloadlinux-2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2.tar.xz
scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0)
Use vzalloc() instead of vmalloc() and memset(0) to simpify the code. Link: https://lore.kernel.org/r/20210518132018.1312995-1-yangyingliang@huawei.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r--drivers/scsi/qedf/qedf_dbg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c
index e0387e495261..0d2aed82882a 100644
--- a/drivers/scsi/qedf/qedf_dbg.c
+++ b/drivers/scsi/qedf/qedf_dbg.c
@@ -106,11 +106,10 @@ ret:
int
qedf_alloc_grc_dump_buf(u8 **buf, uint32_t len)
{
- *buf = vmalloc(len);
+ *buf = vzalloc(len);
if (!(*buf))
return -ENOMEM;
- memset(*buf, 0, len);
return 0;
}