]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme: fix error pointer dereference in error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 15 Oct 2022 08:25:56 +0000 (11:25 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 19 Oct 2022 08:36:39 +0000 (10:36 +0200)
There is typo here so it releases the wrong variable.  "ctrl->admin_q"
was intended instead of "ctrl->fabrics_q".

Fixes: 174feca0ec20 ("nvme: add common helpers to allocate and free tagsets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c

index 059737c1a2c19c3a9d73f0b0c4ec2d5a878017e1..9cbe7854d4883c5820b24773a30553132bf3567e 100644 (file)
@@ -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;