Commit 31b980c0 authored by Zheyu Ma's avatar Zheyu Ma Committed by Mauro Carvalho Chehab
Browse files

media: TDA1997x: Fix the error handling in tda1997x_probe()



The driver should disable the regulator when failing to probe.

Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Acked-by: default avatarTim Harvey <tharvey@gateworks.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 73ed516a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2798,6 +2798,7 @@ static int tda1997x_probe(struct i2c_client *client,
	cancel_delayed_work(&state->delayed_work_enable_hpd);
	mutex_destroy(&state->page_lock);
	mutex_destroy(&state->lock);
	tda1997x_set_power(state, 0);
err_free_state:
	kfree(state);
	dev_err(&client->dev, "%s failed: %d\n", __func__, ret);