Skip to content

Commit

Permalink
[media] omap3isp: Don't increment node entity use count when poweron …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Apr 19, 2011
1 parent c09af04 commit e224153
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/omap3isp/isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e224153

Please sign in to comment.