aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMax Gurtovoy <maxg@mellanox.com>2017-01-23 04:01:12 -0500
committerJens Axboe <axboe@fb.com>2017-02-22 15:34:00 -0500
commit2dbf5816bb52ee3198882c1d198440e4bac62253 (patch)
treef694821390b376f3adc0b0ef1e37594f5b616f78 /drivers
parent8432bdb2905713cb3ef5cbe4a72630fa575565ad (diff)
nvmet: avoid dereferencing nvmet_req
No need to dereference req twice to get the cmd when we already have it stored in a local variable. Signed-off-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/target/fabrics-cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 18dc314601c3..8bd022af3df6 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -220,7 +220,7 @@ int nvmet_parse_connect_cmd(struct nvmet_req *req)
220 220
221 req->ns = NULL; 221 req->ns = NULL;
222 222
223 if (req->cmd->common.opcode != nvme_fabrics_command) { 223 if (cmd->common.opcode != nvme_fabrics_command) {
224 pr_err("invalid command 0x%x on unconnected queue.\n", 224 pr_err("invalid command 0x%x on unconnected queue.\n",
225 cmd->fabrics.opcode); 225 cmd->fabrics.opcode);
226 return NVME_SC_INVALID_OPCODE | NVME_SC_DNR; 226 return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;