diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2018-05-10 08:46:30 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-25 16:50:12 +0200 |
commit | 618cff4285dc0ef6ebb99f715116e7af62565293 (patch) | |
tree | dfb5fa2d44a714d4b60d4688a312ff3787051abb /drivers/nvme/target/fabrics-cmd.c | |
parent | nvmet: make a few error messages more generic (diff) | |
download | linux-618cff4285dc0ef6ebb99f715116e7af62565293.tar.xz linux-618cff4285dc0ef6ebb99f715116e7af62565293.zip |
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/fabrics-cmd.c')
-rw-r--r-- | drivers/nvme/target/fabrics-cmd.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c index 19e9e42ae943..d84ae004cb85 100644 --- a/drivers/nvme/target/fabrics-cmd.c +++ b/drivers/nvme/target/fabrics-cmd.c @@ -77,8 +77,6 @@ u16 nvmet_parse_fabrics_cmd(struct nvmet_req *req) { struct nvme_command *cmd = req->cmd; - req->ns = NULL; - switch (cmd->fabrics.fctype) { case nvme_fabrics_type_property_set: req->data_len = 0; @@ -242,8 +240,6 @@ u16 nvmet_parse_connect_cmd(struct nvmet_req *req) { struct nvme_command *cmd = req->cmd; - req->ns = NULL; - if (cmd->common.opcode != nvme_fabrics_command) { pr_err("invalid command 0x%x on unconnected queue.\n", cmd->fabrics.opcode); |