Commit e68bc5ef authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Greg Kroah-Hartman

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

commit 3e2dc6bd upstream.

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: 58579c05 ("ALSA: dice: use extended protocol to detect available stream formats")
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a75df0c
...@@ -159,8 +159,11 @@ int snd_dice_detect_extension_formats(struct snd_dice *dice) ...@@ -159,8 +159,11 @@ int snd_dice_detect_extension_formats(struct snd_dice *dice)
int j; int j;
for (j = i + 1; j < 9; ++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; goto end;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment