From: Hans Verkuil <hans.verk...@cisco.com>

This can leave adv7180 in an inconsistent state

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
Cc: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se>
---
 drivers/media/platform/rcar-vin/rcar-dma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c 
b/drivers/media/platform/rcar-vin/rcar-dma.c
index 644ec9b..087c30c 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -1058,8 +1058,10 @@ static int rvin_start_streaming(struct vb2_queue *vq, 
unsigned int count)
        ret = rvin_capture_start(vin);
 out:
        /* Return all buffers if something went wrong */
-       if (ret)
+       if (ret) {
                return_all_buffers(vin, VB2_BUF_STATE_QUEUED);
+               v4l2_subdev_call(sd, video, s_stream, 0);
+       }
 
        spin_unlock_irqrestore(&vin->qlock, flags);
 
-- 
2.8.0.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to