Skip to contentSkip to conversation

ALSA: mtpav: restore negation dropped in guard() conversion

PATCH In review Wang Yan 2 participants 2 messages Oct 20 Sound

lore
Share & tools
lore

Wang Yan

author
#0 lore raw

PATCH 1/1 ALSA: mtpav: restore negation dropped in guard() conversion

commit 316e0074ecdc ("ALSA: mtpav: Use guard() for spin locks") claims to be "Merely code refactoring, and no behavior change", but it accidentally dropped the "!" from

        if (! (portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED))

in snd_mtpav_output_trigger().

Restore the negation.

---
 sound/drivers/mtpav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/drivers/mtpav.c +1 -1
index 1ed6d4f0cb62..288a873a27e6 100644
@@ -443,7 +443,7 @@ static void snd_mtpav_output_trigger(struct snd_rawmidi_substream *substream, in
 
 	scoped_guard(spinlock_irqsave, &mtp_card->spinlock) {
 		if (up) {
-			if ((portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
+			if (!(portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
 				if (mtp_card->istimer++ == 0)
 					snd_mtpav_add_output_timer(mtp_card);
 				portp->mode |= MTPAV_MODE_OUTPUT_TRIGGERED;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Wang Yan

commit 316e0074ecdc ("ALSA: mtpav: Use guard() for spin locks") claims to be "Merely code refactoring, and no behavior change", but it accidentally dropped the "!" from

Quoted 7 lines
        if (! (portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED))

in snd_mtpav_output_trigger().

Restore the negation.

Applied now. Thanks.

Takashi