linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] i2c: s3c2410: Add missing clock unprepare on probe() error path
@ 2016-04-21  7:04 Krzysztof Kozlowski
  2016-04-21  7:04 ` [PATCH v2 2/3] i2c: s3c2410: Minor function-level comment cleanup Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-04-21  7:04 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Wolfram Sang, linux-arm-kernel,
	linux-samsung-soc, linux-i2c, linux-kernel
  Cc: Javier Martinez Canillas, Bartlomiej Zolnierkiewicz

If during probe() the s3c24xx_i2c_init() failed, the clock was left in
disabled but prepared state.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

Changes since v1:
1. Add Javier's reviewed-by.
---
 drivers/i2c/busses/i2c-s3c2410.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 362a6de54833..e9658af36f2e 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1200,6 +1200,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	clk_disable(i2c->clk);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "I2C controller init failed\n");
+		clk_unprepare(i2c->clk);
 		return ret;
 	}
 	/* find the IRQ for this unit (note, this relies on the init call to
-- 
1.9.1

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

end of thread, other threads:[~2016-04-25 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21  7:04 [PATCH v2 1/3] i2c: s3c2410: Add missing clock unprepare on probe() error path Krzysztof Kozlowski
2016-04-21  7:04 ` [PATCH v2 2/3] i2c: s3c2410: Minor function-level comment cleanup Krzysztof Kozlowski
2016-04-25 22:23   ` Wolfram Sang
2016-04-21  7:04 ` [PATCH v2 3/3] i2c: s3c2410: Cleanup indentation and comment style Krzysztof Kozlowski
2016-04-25 22:28   ` Wolfram Sang
2016-04-25 22:23 ` [PATCH v2 1/3] i2c: s3c2410: Add missing clock unprepare on probe() error path Wolfram Sang

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).