diff mbox series

[1/3] dice: fix fallback from protocol extension into limited functionality

Message ID 20200113084630.14305-2-o-takashi@sakamocchi.jp (mailing list archive)
State New, archived
Headers show
Series ALSA: dice: add support for Alesis MasterControl | expand

Commit Message

Takashi Sakamoto Jan. 13, 2020, 8:46 a.m. UTC
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>
---
 sound/firewire/dice/dice-extension.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Takashi Iwai Jan. 13, 2020, 9:47 a.m. UTC | #1
On Mon, 13 Jan 2020 09:46:28 +0100,
Takashi Sakamoto wrote:
> 
> 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>

Applied to for-linus branch.  Thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/firewire/dice/dice-extension.c b/sound/firewire/dice/dice-extension.c
index a63fcbc875ad..02f4a8318e38 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;
+			}
 		}
 	}