]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] omap3isp: Don't increment node entity use count when poweron fails
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 1 Apr 2011 12:12:54 +0000 (09:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 19 Apr 2011 14:28:42 +0000 (11:28 -0300)
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>
drivers/media/video/omap3isp/isp.c

index 5d8e1ce645080c5c9c816fc3cb25ff96da278d64..de2dec50666350f96e988bc90ac31bae19b97a67 100644 (file)
@@ -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);