Message ID | 20210115002148.4079591-2-niklas.soderlund+renesas@ragnatech.se |
---|---|
State | Accepted |
Commit | c4f115355c53a0df9ac3a8a33f31ff23970c2737 |
Headers | show |
Series | rcar-csi2: Update handling of transfer error | expand |
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index 48280ddb15b9b0ee..f30dafbdf61ca15f 100644 --- a/drivers/media/platform/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/rcar-vin/rcar-dma.c @@ -1301,6 +1301,11 @@ void rvin_stop_streaming(struct rvin_dev *vin) spin_lock_irqsave(&vin->qlock, flags); + if (vin->state == STOPPED) { + spin_unlock_irqrestore(&vin->qlock, flags); + return; + } + vin->state = STOPPING; /* Wait until only scratch buffer is used, max 3 interrupts. */
Do not attempt to stop the streaming if the stream is not running. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-dma.c | 5 +++++ 1 file changed, 5 insertions(+)