From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jackie Liu <liuyun01@kylinos.cn>,
Genjian Zhang <zhanggenjian@kylinos.cn>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
Sasha Levin <sashal@kernel.org>,
linux-nvme@lists.infradead.org
Subject: [PATCH AUTOSEL 6.0 26/67] nvmet-auth: clean up with done_kfree
Date: Wed, 12 Oct 2022 20:15:07 -0400 [thread overview]
Message-ID: <20221013001554.1892206-26-sashal@kernel.org> (raw)
In-Reply-To: <20221013001554.1892206-1-sashal@kernel.org>
From: Jackie Liu <liuyun01@kylinos.cn>
[ Upstream commit 42147981561c3344d2c6781fe7029e5900daa9fb ]
Jump directly to done_kfree to release d, which is consistent with the
code style behind.
Reported-by: Genjian Zhang <zhanggenjian@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/target/fabrics-cmd-auth.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
index ebdf9aa81041..8458ec40340b 100644
--- a/drivers/nvme/target/fabrics-cmd-auth.c
+++ b/drivers/nvme/target/fabrics-cmd-auth.c
@@ -229,10 +229,8 @@ void nvmet_execute_auth_send(struct nvmet_req *req)
}
status = nvmet_copy_from_sgl(req, 0, d, tl);
- if (status) {
- kfree(d);
- goto done;
- }
+ if (status)
+ goto done_kfree;
data = d;
pr_debug("%s: ctrl %d qid %d type %d id %d step %x\n", __func__,
--
2.35.1
next parent reply other threads:[~2022-10-13 0:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221013001554.1892206-1-sashal@kernel.org>
2022-10-13 0:15 ` Sasha Levin [this message]
2022-10-13 0:15 ` [PATCH AUTOSEL 6.0 52/67] nvme: handle effects after freeing the request Sasha Levin
2022-10-13 0:15 ` [PATCH AUTOSEL 6.0 53/67] nvme: copy firmware_rev on each init Sasha Levin
2022-10-13 0:15 ` [PATCH AUTOSEL 6.0 54/67] nvmet-tcp: add bounds check on Transfer Tag Sasha Levin
2022-10-13 0:15 ` [PATCH AUTOSEL 6.0 58/67] nvmet: don't look at the request_queue in nvmet_bdev_zone_mgmt_emulate_all Sasha Levin
2022-10-13 0:15 ` [PATCH AUTOSEL 6.0 59/67] nvmet: don't look at the request_queue in nvmet_bdev_set_limits Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221013001554.1892206-26-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=liuyun01@kylinos.cn \
--cc=sagi@grimberg.me \
--cc=stable@vger.kernel.org \
--cc=zhanggenjian@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox