nvmet: remove redundant memset if failed to get_smart_log failed
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>
This commit is contained in:
parent
aba7afc567
commit
dafc040ba6
|
@ -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:
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue