nvmet: nvmet_sq_init(): fix use of uninitialized variable
Subsystems (2)
PATCH 1/1 nvmet: nvmet_sq_init(): fix use of uninitialized variable
From: Wilfred Mallawa <[email protected]>
This fixes a bug where an uninitialized return value is used in nvmet_sq_init().
Fixes 206372d7c565 ("nvmet: support completion queue sharing")
Reported-by kernel test robot <[email protected]>
Signed-off-by Wilfred Mallawa <[email protected]>
--- drivers/nvme/target/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/core.c +1 -1
@@ -1012,7 +1012,7 @@ int nvmet_sq_init(struct nvmet_sq *sq, struct nvmet_cq *cq)int ret;if (!nvmet_cq_get (cq)) -return ret; +return -EINVAL ; ret =percpu_ref_init (&sq->ref, nvmet_sq_free,0 ,GFP_KERNEL );if (ret) {
Signature · 1 line
2.49.0
Quoted 9 lines · Wilfred Mallawa
From: Wilfred Mallawa <[email protected]>
This fixes a bug where an uninitialized return value is used in
nvmet_sq_init().Fixes 206372d7c565 ("nvmet: support completion queue sharing")Reported-by kernel test robot <[email protected]>Signed-off-by Wilfred Mallawa <[email protected]>
Thanks for tagging to report! Looks good.
Reviewed-by Keith Busch <[email protected]>
Christoph Hellwig
maintainerThanks,
I've folded this into the original commit.
Great! Thanks Christoph!
Wilfred
Quoted 3 lines · Christoph Hellwig
Thanks,
I've folded this into the original commit.