bcache: add proper error unwinding in bcache_device_init
authorChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 06:40:26 +0000 (08:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:25 +0000 (09:50 +0200)
commitcf13537be54c6ea49f208668f5f8b8bda3edd28e
treeef4ce788997344a631081645ec2146b2e7689d75
parent48aa6e4e28c4b8d2dd8e5fdbb6ea0c6fd475909f
bcache: add proper error unwinding in bcache_device_init

[ Upstream commit 224b0683228c5f332f9cee615d85e75e9a347170 ]

Except for the IDA none of the allocations in bcache_device_init is
unwound on error, fix that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20210809064028.1198327-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/bcache/super.c