If an error occurs after successful clk_prepare_enable() call in the probe,
the clk is not clk_disable_unprepare()'ed.
Use devm_clk_get_enabled() instead of devm_clk_get() to fix, and simplify
the probe and the remove function accordingly.
Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
This changes the order of resource releasing when the driver is removed,
but it looks ok to me.
---
drivers/mmc/host/sunplus-mmc.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)