block/brd: add error handling support for add_disk()
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 15 Oct 2021 23:52:07 +0000 (16:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:48:51 +0000 (08:48 +0100)
commit5089247d6cf3c0c728b45de204ebb5e5845f69ea
tree2a67758a2faae9565ef1628f6ba9387accf9c786
parent5c65f097124770c3e5b9b83ed1a8b68c119bc7b5
block/brd: add error handling support for add_disk()

[ Upstream commit e1528830bd4ebf435d91c154e309e6e028336210 ]

We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20211015235219.2191207-2-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 67205f80be99 ("brd: mark as nowait compatible")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/brd.c