From: Zheyu Ma Date: Tue, 10 May 2022 13:41:46 +0000 (+0100) Subject: media: TDA1997x: Fix the error handling in tda1997x_probe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=31b980c06900796070cbbe036483aca4acbdc04f;p=linux.git media: TDA1997x: Fix the error handling in tda1997x_probe() The driver should disable the regulator when failing to probe. Signed-off-by: Zheyu Ma Acked-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 8fafce26d62fa..0de7acdf58a73 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);