mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
media: ov772x: Disable clk on error path
[ Upstream commit 1d18c2cd9d ]
If ov772x_power_on() is unable to get GPIO rstb,
the clock is left undisabled.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b489c1e010
commit
fe9048c7bb
|
|
@ -896,6 +896,7 @@ static int ov772x_power_on(struct ov772x_priv *priv)
|
|||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(priv->rstb_gpio)) {
|
||||
dev_info(&client->dev, "Unable to get GPIO \"reset\"");
|
||||
clk_disable_unprepare(priv->clk);
|
||||
return PTR_ERR(priv->rstb_gpio);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user