mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-21 15:40:53 +10:00
i2c: pxa: fix call balance of i2c->clk handling routines
[ Upstream commit be7113d2e2
]
If the clock i2c->clk was not enabled in i2c_pxa_probe(), it should not be
disabled in any path.
Found by Linux Verification Center (linuxtesting.org) with Klever.
Signed-off-by: Vitalii Mordan <mordan@ispras.ru>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250212172803.1422136-1-mordan@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
05e227f6e9
commit
af99e62d41
@ -1508,7 +1508,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
|
||||
i2c->adap.name);
|
||||
}
|
||||
|
||||
clk_prepare_enable(i2c->clk);
|
||||
ret = clk_prepare_enable(i2c->clk);
|
||||
if (ret)
|
||||
return dev_err_probe(&dev->dev, ret,
|
||||
"failed to enable clock\n");
|
||||
|
||||
if (i2c->use_pio) {
|
||||
i2c->adap.algo = &i2c_pxa_pio_algorithm;
|
||||
|
Loading…
Reference in New Issue
Block a user