diff options
author | Hou Pu <houpu.main@gmail.com> | 2021-07-09 05:32:47 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-08-16 15:42:23 +0300 |
commit | e23439e977ed2b247912c2b5c6945ef1bc380100 (patch) | |
tree | 71ea0dddbefdf0d8330ab1848c1aa79b97ff6ca8 /drivers/nvme | |
parent | 1751e97aa940656b5de0e620f02cf193a275e014 (diff) | |
download | linux-e23439e977ed2b247912c2b5c6945ef1bc380100.tar.xz |
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.c | 1 |
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) { |