Skip to content

Commit

Permalink
media: ov772x: Disable clk on error path
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jacopo Mondi <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
khoroshilov authored and mchehab committed Aug 31, 2018
1 parent 1526dbe commit 1d18c2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/i2c/ov772x.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,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);
}

Expand Down

0 comments on commit 1d18c2c

Please sign in to comment.