projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aba7afc
)
nvmet: remove redundant memset if failed to get_smart_log failed
author
Sagi Grimberg
<sagi@grimberg.me>
Wed, 8 Nov 2017 10:00:29 +0000
(12:00 +0200)
committer
Jens Axboe
<axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000
(19:53 -0700)
We already allocated the buffer with kzalloc.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/admin-cmd.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/target/admin-cmd.c
b/drivers/nvme/target/admin-cmd.c
index
9a7d691
..
dd087be
100644
(file)
--- a/
drivers/nvme/target/admin-cmd.c
+++ b/
drivers/nvme/target/admin-cmd.c
@@
-144,10
+144,8
@@
static void nvmet_execute_get_log_page(struct nvmet_req *req)
}
smart_log = buf;
status = nvmet_get_smart_log(req, smart_log);
- if (status) {
- memset(buf, '\0', data_len);
+ if (status)
goto err;
- }
break;
case NVME_LOG_FW_SLOT:
/*