media: tvp5150: fix irq_request error path during probe

This change “media: tvp5150: fix irq_request error path during probe” in Linux kernel is authored by Marco Felsch <m.felsch [at] pengutronix.de> on Tue Sep 18 09:14:46 2018 -0400.

media: tvp5150: fix irq_request error path during probe

Commit 37c65802e76a ("media: tvp5150: Add sync lock interrupt handling")
introduced the interrupt handling. But we have to free the
v4l2_ctrl_handler before we can return the error code.

Fixes: 37c65802e76a ("media: tvp5150: Add sync lock interrupt handling")

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 81fd5fd.

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/media/i2c/tvp5150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 0e91b99..eaddd97 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -1790,7 +1790,7 @@ static int tvp5150_probe(struct i2c_client *c,
 						tvp5150_isr, IRQF_TRIGGER_HIGH |
 						IRQF_ONESHOT, "tvp5150", core);
 		if (res)
-			return res;
+			goto err;
 	}
 
 	res = v4l2_async_register_subdev(sd);

The commit for this change in Linux stable tree is 81fd5fd (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *