mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe()
commit a9503a2ecd95e23d7243bcde7138192de8c1c281 upstream.
omap_i2c_init() can fail. Handle this error in omap_i2c_probe().
Fixes: 010d442c4a ("i2c: New bus driver for TI OMAP boards")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <stable@vger.kernel.org> # v2.6.19+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/565311abf9bafd7291ca82bcecb48c1fac1e727b.1751701715.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a7b84035ba
commit
7e5ec0059e
@@ -1475,7 +1475,9 @@ omap_i2c_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* reset ASAP, clearing any IRQs */
|
||||
omap_i2c_init(omap);
|
||||
r = omap_i2c_init(omap);
|
||||
if (r)
|
||||
goto err_mux_state_deselect;
|
||||
|
||||
if (omap->rev < OMAP_I2C_OMAP1_REV_2)
|
||||
r = devm_request_irq(&pdev->dev, omap->irq, omap_i2c_omap1_isr,
|
||||
@@ -1518,6 +1520,7 @@ omap_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
err_unuse_clocks:
|
||||
omap_i2c_write_reg(omap, OMAP_I2C_CON_REG, 0);
|
||||
err_mux_state_deselect:
|
||||
if (omap->mux_state)
|
||||
mux_state_deselect(omap->mux_state);
|
||||
err_put_pm:
|
||||
|
||||
Reference in New Issue
Block a user