mtd_blkdevs: initialze new->rq in add_mtd_blktrans_dev
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Jun 2021 07:15:46 +0000 (09:15 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jun 2021 12:53:50 +0000 (06:53 -0600)
commit07a719f8fdbe4ae0f825fa1a6d2755a63deb265e
treeab205dd3344456815afcade138d36e139165897b
parentec06c989bb45acc28c7633703685dd684b1b5d9c
mtd_blkdevs: initialze new->rq in add_mtd_blktrans_dev

Various places expect the request_queue in ->rq.  Initialize it to
avoid NULL pointer derefences.

Fixes: 6966bb921def ("mtd_blkdevs: use blk_mq_alloc_disk")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/mtd/mtd_blkdevs.c