media: i2c: ov772x: fix memory leak in probe error path
PATCH 1/1 media: i2c: ov772x: fix memory leak in probe error path
If ov772x_parse_dt() fails, the probe function branches to error_clk_put, which does not put the powerdown GPIO, leading to a memory leak. Branch to error_gpio_put instead.
Signed-off-by Biren Pandya <[email protected]>
--- drivers/media/i2c/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov772x.c +1 -1
@@ -1496,7 +1496,7 @@ static int ov772x_probe(struct i2c_client *client) ret =ov772x_parse_dt (client, priv);if (ret) - goto error_clk_put; + goto error_gpio_put; ret =ov772x_video_probe (priv);if (ret <0 )
Signature · 1 line
2.50.1 (Apple Git-155)