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

mmc: 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.

The caller only cleanups the disk if we pass on an allocated md but on
error we return return ERR_PTR(ret), and so we must do all the unwinding
ourselves.

Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210830212538.148729-5-mcgrof@kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent d74179b8
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