Skip to content
Commit 2304c55f authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Ulf Hansson
Browse files

memstick: ms_block: 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.

Contrary to the typical removal which delays the put_disk() until later,
since we are failing on a probe we immediately put the disk on failure from
add_disk by using blk_cleanup_disk().

Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210902174105.2418771-3-mcgrof@kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 295c894c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment