ALSA: cs4281: Send the PCM period elapsed notification properly

As part of spin lock code cleanup using guard(), a new
variable (period_elapsed) was introduced. However this variable
is never set, causing period elapsed notification to be not sent.

Set the value of period_elapsed appropiately.

This issue was reported by static coverity analyzer.

Fixes: 7a5127c2c8 ("ALSA: cs4281: Use guard() for spin locks")
Signed-off-by: Chandra Mohan Sundar <chandramohan.explore@gmail.com>
Link: https://patch.msgid.link/20250906162158.564899-1-chandramohan.explore@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Chandra Mohan Sundar 2025-09-06 21:51:54 +05:30 committed by Takashi Iwai
parent a73349c5dd
commit 400f60b274
1 changed files with 1 additions and 0 deletions

View File

@ -1752,6 +1752,7 @@ static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id)
chip->spurious_dtc_irq++;
continue;
}
period_elapsed = true;
}
if (period_elapsed)
snd_pcm_period_elapsed(cdma->substream);