linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] i2c: imx: Fix PM runtime inbalance in probe error path
@ 2020-06-14 10:29 Krzysztof Kozlowski
  2020-06-14 10:29 ` [PATCH v2 2/2] i2c: imx: Fix external abort on interrupt in exit paths Krzysztof Kozlowski
  2020-06-15  6:50 ` [PATCH v2 1/2] i2c: imx: Fix PM runtime inbalance in probe error path Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-06-14 10:29 UTC (permalink / raw)
  To: Oleksij Rempel, Pengutronix Kernel Team, Shawn Guo, Sascha Hauer,
	Fabio Estevam, NXP Linux Team, Wolfram Sang, linux-i2c,
	linux-arm-kernel, linux-kernel
  Cc: Oleksij Rempel, Marc Kleine-Budde, stable, Krzysztof Kozlowski

When pm_runtime_get_sync() fails in probe(), the error path should not
call pm_runtime_put_noidle().  This would lead to inbalance in
usage_count.

Fixes: 588eb93ea49f ("i2c: imx: add runtime pm support to improve the performance")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. New patch
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 0ab5381aa012..6e45958565d1 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1239,8 +1239,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
 
 clk_notifier_unregister:
 	clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
-rpm_disable:
 	pm_runtime_put_noidle(&pdev->dev);
+rpm_disable:
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-07 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 10:29 [PATCH v2 1/2] i2c: imx: Fix PM runtime inbalance in probe error path Krzysztof Kozlowski
2020-06-14 10:29 ` [PATCH v2 2/2] i2c: imx: Fix external abort on interrupt in exit paths Krzysztof Kozlowski
2020-07-07 18:33   ` Krzysztof Kozlowski
2020-06-15  6:50 ` [PATCH v2 1/2] i2c: imx: Fix PM runtime inbalance in probe error path Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).