diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-06 17:52:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-06 17:52:59 -0400 |
commit | faac51ddac4575880f20e5c70fa1d50401dd940a (patch) | |
tree | 07b904ed4c1864378962d5424ed10f8609da19fd | |
parent | 373c392508577b24e293ff4994e919087fed2495 (diff) | |
parent | 3ace6891ce8bb9e1267358cb58f93b4fd8b72b69 (diff) |
Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang:
"A simple but wanted driver bugfix"
* 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: imx: don't leak the i2c adapter on error
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 42fed40198a0..c0c3043b5d61 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -1169,11 +1169,13 @@ static int i2c_imx_probe(struct platform_device *pdev) | |||
1169 | /* Init DMA config if supported */ | 1169 | /* Init DMA config if supported */ |
1170 | ret = i2c_imx_dma_request(i2c_imx, phy_addr); | 1170 | ret = i2c_imx_dma_request(i2c_imx, phy_addr); |
1171 | if (ret < 0) | 1171 | if (ret < 0) |
1172 | goto clk_notifier_unregister; | 1172 | goto del_adapter; |
1173 | 1173 | ||
1174 | dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); | 1174 | dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); |
1175 | return 0; /* Return OK */ | 1175 | return 0; /* Return OK */ |
1176 | 1176 | ||
1177 | del_adapter: | ||
1178 | i2c_del_adapter(&i2c_imx->adapter); | ||
1177 | clk_notifier_unregister: | 1179 | clk_notifier_unregister: |
1178 | clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb); | 1180 | clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb); |
1179 | rpm_disable: | 1181 | rpm_disable: |