summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedf/qedf_dbg.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-05-18 15:20:18 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-21 22:31:17 +0200
commit2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2 (patch)
treefeff7a30d35738b2f6265eb8acf9e074398c046a /drivers/scsi/qedf/qedf_dbg.c
parentscsi: ufs: ufs-exynos: Move definitions from .h to .c (diff)
downloadlinux-2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2.tar.xz
linux-2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2.zip
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 '')
-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;
}