bcache: add error check for calling register_bdev()
authorColy Li <colyli@suse.de>
Wed, 24 Apr 2019 16:48:37 +0000 (00:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Apr 2019 16:56:28 +0000 (10:56 -0600)
commit88c12d42d2bb6e05deb3cfd24d12f6fe80544575
treea468c2ee2f98c1e94073fe7c5b178489c65f7784
parent68d10e6979a3b59e3cd2e90bfcafed79c4cf180a
bcache: add error check for calling register_bdev()

This patch adds return value to register_bdev(). Then if failure happens
inside register_bdev(), its caller register_bcache() may detect and
handle the failure more properly.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c