summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/io-cmd.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2018-05-10 09:46:30 +0300
committerChristoph Hellwig <hch@lst.de>2018-05-25 17:50:12 +0300
commit618cff4285dc0ef6ebb99f715116e7af62565293 (patch)
treedfb5fa2d44a714d4b60d4688a312ff3787051abb /drivers/nvme/target/io-cmd.c
parentb40b83e365d6ccc2d900e7f481bab91146a68407 (diff)
downloadlinux-618cff4285dc0ef6ebb99f715116e7af62565293.tar.xz
nvmet: remove duplicate NULL initialization for req->ns
Remove the duplicate NULL initialization for req->ns. req->ns is always initialized to NULL in nvmet_req_init(), so there is no need to reset it later on failures unless we have previously assigned a value to it. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/io-cmd.c')
-rw-r--r--drivers/nvme/target/io-cmd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvme/target/io-cmd.c b/drivers/nvme/target/io-cmd.c
index cd2344179673..e5eb2db4d20f 100644
--- a/drivers/nvme/target/io-cmd.c
+++ b/drivers/nvme/target/io-cmd.c
@@ -195,10 +195,8 @@ u16 nvmet_parse_io_cmd(struct nvmet_req *req)
u16 ret;
ret = nvmet_check_ctrl_status(req, cmd);
- if (unlikely(ret)) {
- req->ns = NULL;
+ if (unlikely(ret))
return ret;
- }
req->ns = nvmet_find_namespace(req->sq->ctrl, cmd->rw.nsid);
if (unlikely(!req->ns))