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:
Sagi Grimberg 2017-11-08 12:00:29 +02:00 committed by Jens Axboe
parent aba7afc567
commit dafc040ba6
1 changed files with 1 additions and 3 deletions

View File

@ -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:
/*