Skip to contentSkip to conversation

nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options

PATCH Applied Hou Pu 2 participants 2 messages Jul 9, 2021 – Jul 16, 2021 NVMe

lore
Share & tools
lore

Hou Pu

author
#0 lore raw

PATCH 1/1 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").

---
 drivers/nvme/host/fabrics.c | 1 -
 1 file changed, 1 deletion(-)
drivers/nvme/host/fabrics.c +0 -1
index a5469fd9d4c3..668c6bb7a567 100644
@@ -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) {
Signature · 7 lines
2.28.0


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme