summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/apple.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-10-18 15:57:17 +0200
committerJens Axboe <axboe@kernel.dk>2022-10-25 08:25:10 -0600
commit2b3f056f72e56fa07df69b4705e0b46a6c08e77c (patch)
treecbff7730308b378de7bc8e3ac7076195404f9be4 /drivers/nvme/host/apple.c
parent8ed40ee35d94df2fdb56bbbc07e17dffd2383625 (diff)
downloadlinux-next-2b3f056f72e56fa07df69b4705e0b46a6c08e77c.tar.gz
blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue
The fact that blk_mq_destroy_queue also drops a queue reference leads to various places having to grab an extra reference. Move the call to blk_put_queue into the callers to allow removing the extra references. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20221018135720.670094-2-hch@lst.de [axboe: fix fabrics_q vs admin_q conflict in nvme core.c] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/apple.c')
-rw-r--r--drivers/nvme/host/apple.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index ff8b083dc5c6..7b8068aab7fc 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1510,6 +1510,7 @@ static int apple_nvme_probe(struct platform_device *pdev)
if (!blk_get_queue(anv->ctrl.admin_q)) {
nvme_start_admin_queue(&anv->ctrl);
blk_mq_destroy_queue(anv->ctrl.admin_q);
+ blk_put_queue(anv->ctrl.admin_q);
anv->ctrl.admin_q = NULL;
ret = -ENODEV;
goto put_dev;