isp_register_entities() ignores registration failure of the sensor,
/dev/video* devices are created nevertheless

if the sensor fails, all entities should not be created

Signed-off-by: Peter Meerwald <pme...@pmeerw.net>
---
I'm not too sure about the ENODEV error code

 drivers/media/platform/omap3isp/isp.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index 06a0df4..1ef6b5d 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -1903,8 +1903,10 @@ static int isp_register_entities(struct isp_device *isp)
                unsigned int i;
 
                sensor = isp_register_subdev_group(isp, subdevs->subdevs);
-               if (sensor == NULL)
-                       continue;
+               if (sensor == NULL) {
+                       ret = -ENODEV;
+                       goto done;
+               }
 
                sensor->host_priv = subdevs;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to