media: rcar-vin: Do not try to stop stream if not running
Do not attempt to stop the streaming if the stream is not running. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
b7da24739f
commit
c4f115355c
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue