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/discovery.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/discovery.c')
-rw-r--r-- | drivers/nvme/target/discovery.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c index 231e04e0a496..08656b849bd6 100644 --- a/drivers/nvme/target/discovery.c +++ b/drivers/nvme/target/discovery.c @@ -187,8 +187,6 @@ u16 nvmet_parse_discovery_cmd(struct nvmet_req *req) { struct nvme_command *cmd = req->cmd; - req->ns = NULL; - if (unlikely(!(req->sq->ctrl->csts & NVME_CSTS_RDY))) { pr_err("got cmd %d while not ready\n", cmd->common.opcode); |