mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: TDA1997x: Fix the error handling in tda1997x_probe()
@ 2022-05-10 13:41 Zheyu Ma
  2022-05-13 15:35 ` Tim Harvey
  0 siblings, 1 reply; 2+ messages in thread
From: Zheyu Ma @ 2022-05-10 13:41 UTC (permalink / raw)
  To: tharvey, mchehab; +Cc: linux-media, linux-kernel, Zheyu Ma

The driver should disable the regulator when failing to probe.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
---
 drivers/media/i2c/tda1997x.c | 1 +
 1 file changed, 1 insertion(+)

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 @@ 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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-13 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 13:41 [PATCH] media: TDA1997x: Fix the error handling in tda1997x_probe() Zheyu Ma
2022-05-13 15:35 ` Tim Harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®