summaryrefslogtreecommitdiff
path: root/sound/soc/renesas/rcar/src.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/renesas/rcar/src.c')
-rw-r--r--sound/soc/renesas/rcar/src.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sound/soc/renesas/rcar/src.c b/sound/soc/renesas/rcar/src.c
index f47bf38c2f94..6a3dbc84f474 100644
--- a/sound/soc/renesas/rcar/src.c
+++ b/sound/soc/renesas/rcar/src.c
@@ -558,19 +558,16 @@ static void __rsnd_src_interrupt(struct rsnd_mod *mod,
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
bool stop = false;
- spin_lock(&priv->lock);
-
- /* ignore all cases if not working */
- if (!rsnd_io_is_working(io))
- goto rsnd_src_interrupt_out;
+ scoped_guard(spinlock, &priv->lock) {
+ /* ignore all cases if not working */
+ if (!rsnd_io_is_working(io))
+ break;
- if (rsnd_src_error_occurred(mod))
- stop = true;
+ if (rsnd_src_error_occurred(mod))
+ stop = true;
- rsnd_src_status_clear(mod);
-rsnd_src_interrupt_out:
-
- spin_unlock(&priv->lock);
+ rsnd_src_status_clear(mod);
+ }
if (stop)
snd_pcm_stop_xrun(io->substream);