soc: mediatek: PMIC wrap: fix missing clk_disable_unprepare() on error in pwrap_probe()
PATCH 1/1 soc: mediatek: PMIC wrap: fix missing clk_disable_unprepare() on error in pwrap_probe()
From: Wei Yongjun <[email protected]>
Fix the missing clk_disable_unprepare() before return from pwrap_probe() in the error handling case.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/soc/mediatek/mtk-pmic-wrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/mediatek/mtk-pmic-wrap.c +2 -1
@@ -1200,7 +1200,8 @@ static int pwrap_probe(struct platform_device *pdev)if (!(pwrap_readl (wrp,PWRAP_WACS2_RDATA ) &PWRAP_STATE_INIT_DONE0 )) {dev_dbg (wrp->dev,"initialization isn't finished\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto err_out2; }/* Initialize watchdog, may not be done by the bootloader */