[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ+vNU3f6vxwwCjXTA8E8n8EjMFosKpXKRk1TOBz-Tifx15Ufg@mail.gmail.com>
Date: Fri, 13 May 2022 08:35:31 -0700
From: Tim Harvey <tharvey@...eworks.com>
To: Zheyu Ma <zheyuma97@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media <linux-media@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: TDA1997x: Fix the error handling in tda1997x_probe()
On Tue, May 10, 2022 at 6:42 AM Zheyu Ma <zheyuma97@...il.com> wrote:
>
> The driver should disable the regulator when failing to probe.
>
> Signed-off-by: Zheyu Ma <zheyuma97@...il.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
>
Acked-By: Tim Harvey <tharvey@...eworks.com>
Best Regards,
Tim
Powered by blists - more mailing lists