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>
This commit is contained in:
Yang Yingliang 2021-05-18 21:20:18 +08:00 committed by Martin K. Petersen
parent b592d66235
commit 2a38d2a8b4
1 changed files with 1 additions and 2 deletions

View File

@ -106,11 +106,10 @@ qedf_dbg_info(struct qedf_dbg_ctx *qedf, const char *func, u32 line,
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;
}