Skip to content

Commit 41c281a

Browse files
khayash1Ulrich Hecht
authored andcommitted
i2c: designware: Add disabling clocks when probe fails
[ Upstream commit c149841b069ccc6e480b00e11f35a57b5d88c7bb ] After an error occurs during probing state, dw_i2c_plat_pm_cleanup() is called. However, this function doesn't disable clocks and the clock-enable count keeps increasing. Should disable these clocks explicitly. Fixes: 7272194 ("i2c-designware: add minimal support for runtime PM") Co-developed-by: Kohei Ito <ito.kohei@socionext.com> Signed-off-by: Kohei Ito <ito.kohei@socionext.com> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent b6eccd9 commit 41c281a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
365365

366366
exit_probe:
367367
dw_i2c_plat_pm_cleanup(dev);
368+
i2c_dw_prepare_clk(dev, false);
368369
exit_reset:
369370
if (!IS_ERR_OR_NULL(dev->rst))
370371
reset_control_assert(dev->rst);

0 commit comments

Comments
 (0)