Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: dice: fix fallback from protocol extension into limited functionality

At failure of attempt to detect protocol extension, ALSA dice driver
should be fallback to limited functionality. However it's not.

This commit fixes it.

Cc: <stable@vger.kernel.org> # v4.18+
Fixes: 58579c056c1c9 ("ALSA: dice: use extended protocol to detect available stream formats")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Sakamoto and committed by
Takashi Iwai
3e2dc6bd 747d1f07

+4 -1
+4 -1
sound/firewire/dice/dice-extension.c
··· 159 159 int j; 160 160 161 161 for (j = i + 1; j < 9; ++j) { 162 - if (pointers[i * 2] == pointers[j * 2]) 162 + if (pointers[i * 2] == pointers[j * 2]) { 163 + // Fallback to limited functionality. 164 + err = -ENXIO; 163 165 goto end; 166 + } 164 167 } 165 168 } 166 169