aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-04-01 08:12:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-19 10:28:42 -0400
commite2241531a5d015b55cdddd488f6f3477c785f34e (patch)
tree7218ab58ff538e5958d0cc6e9e069a91f0321c3e
parentc09af044db91bf0f8ca5073f5863c7280de39cc1 (diff)
[media] omap3isp: Don't increment node entity use count when poweron fails
When open a device node, all entities part of the same pipeline are powered on. If one of the entities fails to be powered on, the open operations fails. In that case the device node entity use count must not be incremented. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/omap3isp/isp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c
index 5d8e1ce64508..de2dec506663 100644
--- a/drivers/media/video/omap3isp/isp.c
+++ b/drivers/media/video/omap3isp/isp.c
@@ -662,6 +662,8 @@ int omap3isp_pipeline_pm_use(struct media_entity *entity, int use)
662 662
663 /* Apply power change to connected non-nodes. */ 663 /* Apply power change to connected non-nodes. */
664 ret = isp_pipeline_pm_power(entity, change); 664 ret = isp_pipeline_pm_power(entity, change);
665 if (ret < 0)
666 entity->use_count -= change;
665 667
666 mutex_unlock(&entity->parent->graph_mutex); 668 mutex_unlock(&entity->parent->graph_mutex);
667 669