summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorHou Pu <houpu.main@gmail.com>2021-07-09 10:32:47 +0800
committerChristoph Hellwig <hch@lst.de>2021-08-16 14:42:23 +0200
commite23439e977ed2b247912c2b5c6945ef1bc380100 (patch)
tree71ea0dddbefdf0d8330ab1848c1aa79b97ff6ca8 /drivers/nvme
parent1751e97aa940656b5de0e620f02cf193a275e014 (diff)
downloadlinux-e23439e977ed2b247912c2b5c6945ef1bc380100.tar.bz2
nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options
Opts->host is NULL there. It is checked just before. So remove nvmf_host_put. It is introduced by commit 59a2f3f00fd7 ("nvme: fix potential memory leak in option parsing"). Signed-off-by: Hou Pu <houpu.main@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/fabrics.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index a5469fd9d4c3..668c6bb7a567 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -719,7 +719,6 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
ret = -EINVAL;
goto out;
}
- nvmf_host_put(opts->host);
opts->host = nvmf_host_add(p);
kfree(p);
if (!opts->host) {