aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-06 17:52:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-06 17:52:59 -0400
commitfaac51ddac4575880f20e5c70fa1d50401dd940a (patch)
tree07b904ed4c1864378962d5424ed10f8609da19fd
parent373c392508577b24e293ff4994e919087fed2495 (diff)
parent3ace6891ce8bb9e1267358cb58f93b4fd8b72b69 (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.c4
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
1177del_adapter:
1178 i2c_del_adapter(&i2c_imx->adapter);
1177clk_notifier_unregister: 1179clk_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);
1179rpm_disable: 1181rpm_disable: