nvme-tcp-offload: Fix error code in nvme_tcp_ofld_create_ctrl()
Subsystems (2)
PATCH 1/1 nvme-tcp-offload: Fix error code in nvme_tcp_ofld_create_ctrl()
Return an error pointer if try_module_get() fails. Currently it returns NULL.
Fixes 4b8178ec5794 ("nvme-tcp-offload: Add device scan implementation")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/nvme/host/tcp-offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/tcp-offload.c +1 -1
@@ -1215,7 +1215,7 @@ nvme_tcp_ofld_create_ctrl(struct device *ndev, struct nvmf_ctrl_options *opts)/* Increase driver refcnt */ if (!try_module_get (dev->ops->module)) {pr_err ("try_module_get failed\n" ); - dev =NULL ; + rc = -ENODEV ; goto out_free_ctrl; }
Signature · 7 lines
2.30.2 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme