mmc: cavium: Prevent crash with incomplete DT
In case the DT specifies neither a regulator nor a gpio for the shared power the driver will crash accessing the regulator. Prevent the crash by checking the regulator before use. Use mmc_regulator_get_supply() instead of open coding the same logic. Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Showing
想要评论请 注册 或 登录