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

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
...@@ -2798,6 +2798,7 @@ static int tda1997x_probe(struct i2c_client *client, ...@@ -2798,6 +2798,7 @@ static int tda1997x_probe(struct i2c_client *client,
cancel_delayed_work(&state->delayed_work_enable_hpd); cancel_delayed_work(&state->delayed_work_enable_hpd);
mutex_destroy(&state->page_lock); mutex_destroy(&state->page_lock);
mutex_destroy(&state->lock); mutex_destroy(&state->lock);
tda1997x_set_power(state, 0);
err_free_state: err_free_state:
kfree(state); kfree(state);
dev_err(&client->dev, "%s failed: %d\n", __func__, ret); dev_err(&client->dev, "%s failed: %d\n", __func__, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment