diff options
author | Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> | 2021-01-15 01:21:45 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-27 14:16:30 +0100 |
commit | c4f115355c53a0df9ac3a8a33f31ff23970c2737 (patch) | |
tree | 18bbff3568f9264535e5f378c5b52011d4023705 | |
parent | media: videobuf2-v4l2: remove redundant error test (diff) | |
download | linux-c4f115355c53a0df9ac3a8a33f31ff23970c2737.tar.xz linux-c4f115355c53a0df9ac3a8a33f31ff23970c2737.zip |
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>
-rw-r--r-- | drivers/media/platform/rcar-vin/rcar-dma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index 48280ddb15b9..f30dafbdf61c 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. */ |