Commit faac51dd authored by Linus Torvalds's avatar Linus Torvalds

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
parents 373c3925 3ace6891
...@@ -1169,11 +1169,13 @@ static int i2c_imx_probe(struct platform_device *pdev) ...@@ -1169,11 +1169,13 @@ static int i2c_imx_probe(struct platform_device *pdev)
/* Init DMA config if supported */ /* Init DMA config if supported */
ret = i2c_imx_dma_request(i2c_imx, phy_addr); ret = i2c_imx_dma_request(i2c_imx, phy_addr);
if (ret < 0) if (ret < 0)
goto clk_notifier_unregister; goto del_adapter;
dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n"); dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n");
return 0; /* Return OK */ return 0; /* Return OK */
del_adapter:
i2c_del_adapter(&i2c_imx->adapter);
clk_notifier_unregister: clk_notifier_unregister:
clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb); clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
rpm_disable: rpm_disable:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment