From: Takashi Sakamoto Date: Mon, 13 Jan 2020 08:46:28 +0000 (+0900) Subject: ALSA: dice: fix fallback from protocol extension into limited functionality X-Git-Tag: v5.5-rc7~24^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e2dc6bdb56893bc28257e482e1dbe5d39f313df;p=thirdparty%2Flinux.git 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: # v4.18+ Fixes: 58579c056c1c9 ("ALSA: dice: use extended protocol to detect available stream formats") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/dice/dice-extension.c b/sound/firewire/dice/dice-extension.c index a63fcbc875adc..02f4a8318e38e 100644 --- a/sound/firewire/dice/dice-extension.c +++ b/sound/firewire/dice/dice-extension.c @@ -159,8 +159,11 @@ int snd_dice_detect_extension_formats(struct snd_dice *dice) int j; for (j = i + 1; j < 9; ++j) { - if (pointers[i * 2] == pointers[j * 2]) + if (pointers[i * 2] == pointers[j * 2]) { + // Fallback to limited functionality. + err = -ENXIO; goto end; + } } }