Add clk_disable_unprepare() on error path in tc6393xb_resume().
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Yuan Can <[email protected]>
---
drivers/mfd/tc6393xb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 0be5731685b4..1f1aa76292d2 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -850,8 +850,10 @@ static int tc6393xb_resume(struct platform_device *dev)
return ret;
ret = tcpd->resume(dev);
- if (ret)
+ if (ret) {
+ clk_disable_unprepare(tc6393xb->clk);
return ret;
+ }
if (!tcpd->resume_restore)
return 0;
--
2.17.1