Skip to contentSkip to conversation

tree-wide: add missing clk_disable_unprepare() on error in wmt_i2c_reset_hardware()

PATCH New Wei Yongjun 2 participants 2 messages Nov 11, 2013 – Nov 14, 2013 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tree-wide: add missing clk_disable_unprepare() on error in wmt_i2c_reset_hardware()

From: Wei Yongjun <[email protected]>

Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case.

---
 drivers/i2c/busses/i2c-wmt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-wmt.c +1 -0
index 31395fa..2c8a3e4 100644
@@ -349,6 +349,7 @@ static int wmt_i2c_reset_hardware(struct wmt_i2c_dev *i2c_dev)
 	err = clk_set_rate(i2c_dev->clk, 20000000);
 	if (err) {
 		dev_err(i2c_dev->dev, "failed to set clock = 20Mhz\n");
+		clk_disable_unprepare(i2c_dev->clk);
 		return err;
 	}
 
Applied
#1 lore raw

PATCH 1/1 tree-wide: add missing clk_disable_unprepare() on error in wmt_i2c_reset_hardware()

Quoted 6 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case.

Applied to for-next, thanks! Yet, the subject line is really non-standard (i.e. broken). Should be "i2c: wmt: ..."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131114/379287fe/attachment.sig>