[media] v4l: vsp1: Fix routing cleanup when stopping the stream
[linux-2.6-block.git] / drivers / media / platform / vsp1 / vsp1_video.c
index 8a1253e51f04cfa9ddb699c4529e663852fff03e..c717e288d0ee2b3c49c28353f8a9ab96c3eceec1 100644 (file)
@@ -479,7 +479,7 @@ static int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
        ret = ret == 0 ? -ETIMEDOUT : 0;
 
        list_for_each_entry(entity, &pipe->entities, list_pipe) {
-               if (entity->route)
+               if (entity->route && entity->route->reg)
                        vsp1_write(entity->vsp1, entity->route->reg,
                                   VI6_DPR_NODE_UNUSED);
 
@@ -654,8 +654,6 @@ static int vsp1_video_buffer_prepare(struct vb2_buffer *vb)
        if (vb->num_planes < format->num_planes)
                return -EINVAL;
 
-       buf->video = video;
-
        for (i = 0; i < vb->num_planes; ++i) {
                buf->addr[i] = vb2_dma_contig_plane_dma_addr(vb, i);
                buf->length[i] = vb2_plane_size(vb, i);