nvme: uninitialized return in nvme_ns_head_chr_uring_cmd()
Subsystems (2)
PATCH 1/1 nvme: uninitialized return in nvme_ns_head_chr_uring_cmd()
The "ret" value is not set if "ns" is zero.
Fixes 86116c2f6fee ("nvme: wire-up uring-cmd support for io-passthru on char-device.")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/nvme/host/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/ioctl.c +1 -1
@@ -688,7 +688,7 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd, struct nvme_ns_head *head = container_of(cdev, struct nvme_ns_head, cdev);int srcu_idx =srcu_read_lock (&head->srcu);struct nvme_ns *ns =nvme_find_path (head); -int ret; +int ret =0 ;if (ns) ret =nvme_ns_uring_cmd (ns, ioucmd, issue_flags);
Signature · 1 line
2.35.1
Quoted 4 lines · Dan Carpenter
The "ret" value is not set if "ns" is zero.
Fixes 86116c2f6fee ("nvme: wire-up uring-cmd support for io-passthru on char-device.")Signed-off-by Dan Carpenter <[email protected]>
This change is already present in the branch.
Folded during -
https://lore.kernel.org/linux-nvme/[email protected]/