lkml.org 
[lkml]   [2016]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] i2c: designware-platdrv: fix unbalanced clk enable and prepare
Date
If i2c_dw_probe() fail, we should call i2c_dw_plat_prepare_clk() to
disable and unprepare the clk, otherwise the clk enable and prepare
is left unbalanced.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 00f9e99..1488cea 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -268,6 +268,8 @@ rpm_disable:
pm_runtime_put_noidle(&pdev->dev);
}

+ i2c_dw_plat_prepare_clk(dev, false);
+
return r;
}

--
2.8.0.rc3
\
 
 \ /
  Last update: 2016-04-14 15:21    [W:0.077 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site