diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-06-14 19:45:51 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-06-17 15:51:19 +0200 |
commit | 2796a8e409429a67daeb813ed270eb645f56f817 (patch) | |
tree | 1f5e70e6420750d914e3560779c66b47f4da9617 /drivers/nvme | |
parent | 3b54064fbce73a4dada6019dd400f0ce28ab5eb9 (diff) |
nvme-fabrics: remove memset in nvmf_reg_read64()
Declare and initialize structure variable to the zero values so that we
can get rid of the zeroout memset call.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/fabrics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 1239a63e3ac2..4753f1e5505e 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -190,11 +190,10 @@ EXPORT_SYMBOL_GPL(nvmf_reg_read32); */ int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val) { - struct nvme_command cmd; + struct nvme_command cmd = { }; union nvme_result res; int ret; - memset(&cmd, 0, sizeof(cmd)); cmd.prop_get.opcode = nvme_fabrics_command; cmd.prop_get.fctype = nvme_fabrics_type_property_get; cmd.prop_get.attrib = 1; |