i2c: designware: assert reset when error happen at ->probe()
The commitc62ebb3d5f
("i2c: designware: Add support for an interface clock") introduced an optional clock while missed correct error handling. assert reset line back if error happen at ->probe(). Fixes:c62ebb3d5f
("i2c: designware: Add support for an interface clock") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Родитель
f9bf7a8994
Коммит
71dc297ca9
|
@ -346,8 +346,10 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
|
|||
|
||||
/* Optional interface clock */
|
||||
dev->pclk = devm_clk_get_optional(&pdev->dev, "pclk");
|
||||
if (IS_ERR(dev->pclk))
|
||||
return PTR_ERR(dev->pclk);
|
||||
if (IS_ERR(dev->pclk)) {
|
||||
ret = PTR_ERR(dev->pclk);
|
||||
goto exit_reset;
|
||||
}
|
||||
|
||||
dev->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (!i2c_dw_prepare_clk(dev, true)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче