Merge tag 'block-6.0-2022-08-12' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / block / genhd.c
index b901fea..d36fabf 100644 (file)
@@ -1341,7 +1341,7 @@ struct gendisk *__alloc_disk_node(struct request_queue *q, int node_id,
 
        disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id);
        if (!disk)
-               goto out_put_queue;
+               return NULL;
 
        if (bioset_init(&disk->bio_split, BIO_POOL_SIZE, 0, 0))
                goto out_free_disk;
@@ -1390,8 +1390,6 @@ out_free_bioset:
        bioset_exit(&disk->bio_split);
 out_free_disk:
        kfree(disk);
-out_put_queue:
-       blk_put_queue(q);
        return NULL;
 }