diff options
author | Jackie Liu <liuyun01@kylinos.cn> | 2022-08-12 11:12:30 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-09-19 11:33:54 +0200 |
commit | 42147981561c3344d2c6781fe7029e5900daa9fb (patch) | |
tree | 0411bab7bb5c38376f401fed9f58d5a0f8054072 /drivers/nvme | |
parent | 6e6fee569d4733f028f306036aaa12669c25b362 (diff) | |
download | linux-42147981561c3344d2c6781fe7029e5900daa9fb.tar.gz |
nvmet-auth: clean up with done_kfree
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/fabrics-cmd-auth.c | 6 |
1 files 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__, |