From 5cd770f68a2081849a4c1f140dd4eff8387a3da6 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Thu, 12 Apr 2018 08:27:50 -0400 Subject: media: tda1997x: Use bitwise or for setting subdev flags Assigning subdev flags in probe() after v4l2_i2c_subdev_init() clears the I2C flag set by that function. Fix this by using bitwise or instead. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/i2c/tda1997x.c') diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 3021913c28fa..1c5b5f70866f 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2567,7 +2567,7 @@ static int tda1997x_probe(struct i2c_client *client, snprintf(sd->name, sizeof(sd->name), "%s %d-%04x", id->name, i2c_adapter_id(client->adapter), client->addr); - sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; sd->entity.function = MEDIA_ENT_F_DTV_DECODER; sd->entity.ops = &tda1997x_media_ops; -- cgit v1.2.3 From 50a0efae2758687737349707e335ccf2de9007d2 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Tue, 8 May 2018 02:14:15 -0400 Subject: media: i2c: tda1997: Fix an error handling path 'tda1997x_probe()' 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: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/i2c/tda1997x.c') diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 1c5b5f70866f..b697c6f741d1 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -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); -- cgit v1.2.3