summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-04-01 09:12:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-19 11:28:42 -0300
commite2241531a5d015b55cdddd488f6f3477c785f34e (patch)
tree7218ab58ff538e5958d0cc6e9e069a91f0321c3e /drivers/media
parentc09af044db91bf0f8ca5073f5863c7280de39cc1 (diff)
downloadblackbird-op-linux-e2241531a5d015b55cdddd488f6f3477c785f34e.tar.gz
blackbird-op-linux-e2241531a5d015b55cdddd488f6f3477c785f34e.zip
[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>
Diffstat (limited to 'drivers/media')
-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)
/* Apply power change to connected non-nodes. */
ret = isp_pipeline_pm_power(entity, change);
+ if (ret < 0)
+ entity->use_count -= change;
mutex_unlock(&entity->parent->graph_mutex);
OpenPOWER on IntegriCloud