nvme: fix error pointer dereference in error handling
Subsystems (2)
PATCH 1/1 nvme: fix error pointer dereference in error handling
There is typo here so it releases the wrong variable. "ctrl->admin_q" was intended instead of "ctrl->fabrics_q".
Fixes fe60e8c53411 ("nvme: add common helpers to allocate and free tagsets")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
@@ -4846,7 +4846,7 @@ int nvme_alloc_admin_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,return 0 ; out_cleanup_admin_q: -blk_mq_destroy_queue (ctrl->fabrics_q); +blk_mq_destroy_queue (ctrl->admin_q); out_free_tagset:blk_mq_free_tag_set (ctrl->admin_tagset);return ret;
Signature · 1 line
2.35.1
Quoted 5 lines · Dan Carpenter
There is typo here so it releases the wrong variable. "
ctrl->admin_q" was intended instead of "ctrl->fabrics_q".Fixes fe60e8c53411 ("nvme: add common helpers to allocate and free tagsets")Signed-off-by Dan Carpenter <[email protected]>
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
-ck
Thanks, applied to nvme-6.1.