From: Max Gurtovoy Date: Mon, 23 Jan 2017 09:01:12 +0000 (+0200) Subject: nvmet: avoid dereferencing nvmet_req X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2dbf5816bb52ee3198882c1d198440e4bac62253;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe --- 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) req->ns = NULL; - if (req->cmd->common.opcode != nvme_fabrics_command) { + if (cmd->common.opcode != nvme_fabrics_command) { pr_err("invalid command 0x%x on unconnected queue.\n", cmd->fabrics.opcode); return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;