diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2018-05-10 09:46:30 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-25 17:50:12 +0300 |
commit | 618cff4285dc0ef6ebb99f715116e7af62565293 (patch) | |
tree | dfb5fa2d44a714d4b60d4688a312ff3787051abb /drivers/nvme/target/io-cmd.c | |
parent | b40b83e365d6ccc2d900e7f481bab91146a68407 (diff) | |
download | linux-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.c | 4 |
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)) |