The function has a local variable that points to the media device; use that instead of finding the media device under the entity. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- drivers/staging/media/davinci_vpfe/vpfe_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 03269d3..8b2117e 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -145,7 +145,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video) pipe->outputs[pipe->output_num++] = video; mutex_lock(&mdev->graph_mutex); - ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, mdev); if (ret) { mutex_unlock(&mdev->graph_mutex); return -ENOMEM; @@ -300,7 +300,7 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe) mdev = entity->graph_obj.mdev; mutex_lock(&mdev->graph_mutex); - ret = media_graph_walk_init(&pipe->graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&pipe->graph, mdev); if (ret) goto out; media_graph_walk_start(&pipe->graph, entity); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html