diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-05-18 16:20:18 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-05-21 23:31:17 +0300 |
commit | 2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2 (patch) | |
tree | feff7a30d35738b2f6265eb8acf9e074398c046a /drivers/scsi/qedf | |
parent | b592d66235f5f7c2191cc0348468b343c17c3977 (diff) | |
download | linux-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.c | 3 |
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; } |