]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: renesas: rz-ssi: Drop unnecessary if condition
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Mon, 19 Jan 2026 19:52:50 +0000 (21:52 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 20 Jan 2026 12:14:29 +0000 (12:14 +0000)
The is_stopped variable can be initialized directly at declaration,
removing the need for an extra if condition. Drop the if condition and
initialize is_stopped at declaration.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20260119195252.3362486-3-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rz-ssi.c

index f144cbc89fad66845e61a1bf61097815f1605357..46a22debebeb4f394ca6868fd9b595a743f36e54 100644 (file)
@@ -566,7 +566,8 @@ static irqreturn_t rz_ssi_interrupt(int irq, void *data)
                return IRQ_HANDLED; /* Left over TX/RX interrupt */
 
        if (irq == ssi->irq_int) { /* error or idle */
-               bool is_stopped = false;
+               bool is_stopped = !!(ssisr & (SSISR_RUIRQ | SSISR_ROIRQ |
+                                             SSISR_TUIRQ | SSISR_TOIRQ));
                int i, count;
 
                if (rz_ssi_is_dma_enabled(ssi))
@@ -574,9 +575,6 @@ static irqreturn_t rz_ssi_interrupt(int irq, void *data)
                else
                        count = 1;
 
-               if (ssisr & (SSISR_RUIRQ | SSISR_ROIRQ | SSISR_TUIRQ | SSISR_TOIRQ))
-                       is_stopped = true;
-
                if (ssi->capture.substream && is_stopped) {
                        if (ssisr & SSISR_RUIRQ)
                                strm_capture->uerr_num++;