From: Laurent Pinchart Date: Fri, 1 Apr 2011 12:12:54 +0000 (-0300) Subject: [media] omap3isp: Don't increment node entity use count when poweron fails X-Git-Tag: v3.0~800^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2241531a5d015b55cdddd488f6f3477c785f34e;p=platform%2Fkernel%2Flinux-amlogic.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c index 5d8e1ce..de2dec5 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);