Skip to content

Commit

Permalink
media: i2c: tda1997: Fix an error handling path 'tda1997x_probe()'
Browse files Browse the repository at this point in the history
If 'media_entity_pads_init()' fails, we must free the resources allocated
by 'v4l2_ctrl_handler_init()', as already done in the previous error
handling path.

'goto' the right label to fix it.

Fixes: 9ac0038 ("media: i2c: Add TDA1997x HDMI receiver driver")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
tititiou36 authored and mchehab committed May 11, 2018
1 parent de281f7 commit 50a0efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/i2c/tda1997x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2721,7 +2721,7 @@ static int tda1997x_probe(struct i2c_client *client,
state->pads);
if (ret) {
v4l_err(client, "failed entity_init: %d", ret);
goto err_free_mutex;
goto err_free_handler;
}

ret = v4l2_async_register_subdev(sd);
Expand Down

0 comments on commit 50a0efa

Please sign in to comment.