]> git.baikalelectronics.ru Git - kernel.git/commit
swim: add error handling support for add_disk()
authorLuis Chamberlain <mcgrof@kernel.org>
Mon, 27 Sep 2021 22:02:58 +0000 (15:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:37 +0000 (14:41 -0600)
commite12ce7fceab097917808ce13e5aa4b16d86b8591
tree0b2658f44892ecdb65b5d9198c13024c6bf8f097
parent9a2f8d30174945e4a90f83334ef3a47d74d491b8
swim: add error handling support for add_disk()

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

Since we have a caller to do our unwinding for the disk,
and this is already dealt with safely we can re-use our
existing error path goto label which already deals with
the cleanup.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210927220302.1073499-11-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/swim.c