Commit c4f11535 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab
Browse files

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: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b7da2473
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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. */