Patch "ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-usb-audio-always-initialize-fixed_rate-in-snd_usb_find_implicit_fb_sync_format.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 291e9da91403e0e628d7692b5ed505100e7b7706 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@xxxxxxxx>
Date: Mon, 9 Jan 2023 15:11:33 +0100
Subject: ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format()

From: Jaroslav Kysela <perex@xxxxxxxx>

commit 291e9da91403e0e628d7692b5ed505100e7b7706 upstream.

Handle the fallback code path, too.

Fixes: fd28941cff1c ("ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless")
BugLink: https://lore.kernel.org/alsa-devel/Y7frf3N%2FxzvESEsN@kili/
Reported-by: Dan Carpenter <error27@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Jaroslav Kysela <perex@xxxxxxxx>
Link: https://lore.kernel.org/r/20230109141133.335543-1-perex@xxxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/usb/implicit.c |    3 ++-
 sound/usb/pcm.c      |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

--- a/sound/usb/implicit.c
+++ b/sound/usb/implicit.c
@@ -471,7 +471,7 @@ snd_usb_find_implicit_fb_sync_format(str
 	subs = find_matching_substream(chip, stream, target->sync_ep,
 				       target->fmt_type);
 	if (!subs)
-		return sync_fmt;
+		goto end;
 
 	high_score = 0;
 	list_for_each_entry(fp, &subs->fmt_list, list) {
@@ -485,6 +485,7 @@ snd_usb_find_implicit_fb_sync_format(str
 		}
 	}
 
+ end:
 	if (fixed_rate)
 		*fixed_rate = snd_usb_pcm_has_fixed_rate(subs);
 	return sync_fmt;
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -163,6 +163,8 @@ bool snd_usb_pcm_has_fixed_rate(struct s
 	struct snd_usb_audio *chip = subs->stream->chip;
 	int rate = -1;
 
+	if (!subs)
+		return false;
 	if (!(chip->quirk_flags & QUIRK_FLAG_FIXED_RATE))
 		return false;
 	list_for_each_entry(fp, &subs->fmt_list, list) {


Patches currently in stable-queue which might be from perex@xxxxxxxx are

queue-6.1/alsa-control-led-use-strscpy-in-set_led_id.patch
queue-6.1/alsa-usb-audio-always-initialize-fixed_rate-in-snd_usb_find_implicit_fb_sync_format.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux