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@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
                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;
 
        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);