* [PATCH] nvme: uninitialized return in nvme_ns_head_chr_uring_cmd() @ 2022-05-09 9:06 ` Dan Carpenter 2022-05-09 17:37 ` Kanchan Joshi 0 siblings, 1 reply; 2+ messages in thread From: Dan Carpenter @ 2022-05-09 9:06 UTC (permalink / raw) To: Keith Busch, Kanchan Joshi Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, Anuj Gupta, linux-nvme, kernel-janitors 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 <dan.carpenter@oracle.com> --- drivers/nvme/host/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index 4b91e452768b..c118559d47f0 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -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); -- 2.35.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: uninitialized return in nvme_ns_head_chr_uring_cmd() 2022-05-09 9:06 ` [PATCH] nvme: uninitialized return in nvme_ns_head_chr_uring_cmd() Dan Carpenter @ 2022-05-09 17:37 ` Kanchan Joshi 0 siblings, 0 replies; 2+ messages in thread From: Kanchan Joshi @ 2022-05-09 17:37 UTC (permalink / raw) To: Dan Carpenter Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg, Anuj Gupta, linux-nvme, kernel-janitors [-- Attachment #1: Type: text/plain, Size: 398 bytes --] On Mon, May 09, 2022 at 12:06:42PM +0300, Dan Carpenter wrote: >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 <dan.carpenter@oracle.com> This change is already present in the branch. Folded during - https://lore.kernel.org/linux-nvme/20220506150357.2443040-1-nathan@kernel.org/ [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-10 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20220509090735epcas5p372dacbf5a9615ebb97ac8156694866c2@epcas5p3.samsung.com>
2022-05-09 9:06 ` [PATCH] nvme: uninitialized return in nvme_ns_head_chr_uring_cmd() Dan Carpenter
2022-05-09 17:37 ` Kanchan Joshi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox