summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/tda1997x.c
diff options
context:
space:
mode:
authorZheyu Ma <zheyuma97@gmail.com>2022-05-10 16:41:46 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-20 12:30:30 +0300
commit31b980c06900796070cbbe036483aca4acbdc04f (patch)
tree2e9c7f8247469bf71669a3b10915e3ffa60087a3 /drivers/media/i2c/tda1997x.c
parent73ed516abc4e901f4450ff08fe05b3db06227318 (diff)
downloadlinux-31b980c06900796070cbbe036483aca4acbdc04f.tar.xz
media: TDA1997x: Fix the error handling in tda1997x_probe()
The driver should disable the regulator when failing to probe. Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Acked-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/tda1997x.c')
-rw-r--r--drivers/media/i2c/tda1997x.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index 8fafce26d62f..0de7acdf58a7 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -2798,6 +2798,7 @@ err_free_mutex:
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);