virtio-blk: free vblk-vqs in error path of virtblk_probe()
authorHou Tao <houtao1@huawei.com>
Mon, 15 Jun 2020 04:14:59 +0000 (12:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jul 2020 07:39:35 +0000 (09:39 +0200)
commit967ad7f15d93d48ac7c840cfee0d9c84a7353a0d
tree578cef3dd5dd60afefebffbf2cc45e0c0f76c9d2
parent86f7b210e58ea88fc07791552e4527744f65c858
virtio-blk: free vblk-vqs in error path of virtblk_probe()

[ Upstream commit e7eea44eefbdd5f0345a0a8b80a3ca1c21030d06 ]

Else there will be memory leak if alloc_disk() fails.

Fixes: 6a27b656fc02 ("block: virtio-blk: support multi virt queues per virtio-blk device")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/virtio_blk.c