mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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:
parent
b592d66235
commit
2a38d2a8b4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user