[3.19.y-ckt stable] Patch "[media] coda: fix error path in case of missing pdata on non-DT platform" has been added to the 3.19.y-ckt tree

Kamal Mostafa kamal at canonical.com
Sat Apr 2 00:52:22 UTC 2016


This is a note to let you know that I have just added a patch titled

    [media] coda: fix error path in case of missing pdata on non-DT platform

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt18.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

>From d2a09a5e46132bb999375388c52facdc616eccaf Mon Sep 17 00:00:00 2001
From: Philipp Zabel <p.zabel at pengutronix.de>
Date: Fri, 26 Feb 2016 08:21:35 -0300
Subject: [media] coda: fix error path in case of missing pdata on non-DT
 platform

commit bc717d5e92c8c079280eb4acbe335c6f25041aa2 upstream.

If we bail out this early, v4l2_device_register() has not been called
yet, so no need to call v4l2_device_unregister().

Fixes: b7bd660a51f0 ("[media] coda: Call v4l2_device_unregister() from a single location")

Reported-by: Michael Olbrich <m.olbrich at pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
Reviewed-by: Fabio Estevam <fabio.estevam at nxp.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/media/platform/coda/coda-common.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 39330a7..29eff61 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2035,14 +2035,12 @@ static int coda_probe(struct platform_device *pdev)

 	pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);

-	if (of_id) {
+	if (of_id)
 		dev->devtype = of_id->data;
-	} else if (pdev_id) {
+	else if (pdev_id)
 		dev->devtype = &coda_devdata[pdev_id->driver_data];
-	} else {
-		ret = -EINVAL;
-		goto err_v4l2_register;
-	}
+	else
+		return -EINVAL;

 	spin_lock_init(&dev->irqlock);
 	INIT_LIST_HEAD(&dev->instances);
--
2.7.4





More information about the kernel-team mailing list