[PATCH] omap3isp: Make isp_register_entities() fail when sensor registration fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <pmeerw@xxxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux