From: Zheyu Ma <zheyuma97@gmail.com>
To: tharvey@gateworks.com, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Zheyu Ma <zheyuma97@gmail.com>
Subject: [PATCH] media: TDA1997x: Fix the error handling in tda1997x_probe()
Date: Tue, 10 May 2022 21:41:46 +0800 [thread overview]
Message-ID: <20220510134146.1727701-1-zheyuma97@gmail.com> (raw)
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
next reply other threads:[~2022-05-10 14:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 13:41 Zheyu Ma [this message]
2022-05-13 15:35 ` Tim Harvey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220510134146.1727701-1-zheyuma97@gmail.com \
--to=zheyuma97@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®