Patch "ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()" has been added to the 5.15-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: Correct the return code from snd_usb_endpoint_set_params()

to the 5.15-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-correct-the-return-code-from-snd_usb_.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 2447216d3956accd7b3fb5f1d85afe5e88c0d08d
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Sun Oct 9 12:42:11 2022 +0200

    ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
    
    [ Upstream commit 9355b60e401d825590d37f04ea873c58efe9b7bf ]
    
    snd_usb_endpoint_set_params() should return zero for a success, but
    currently it returns the sample rate.  Correct it.
    
    Fixes: 2be79d586454 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)")
    Link: https://lore.kernel.org/r/20221009104212.18877-4-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Stable-dep-of: 7822baa844a8 ("ALSA: usb-audio: add quirk for RODE NT-USB+")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 486ef6b022552..80ead3db4d1c7 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1388,6 +1388,8 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
 	ep->curframesize = ep->curpacksize / ep->cur_frame_bytes;
 
 	err = update_clock_ref_rate(chip, ep);
+	if (err >= 0)
+		err = 0;
  unlock:
 	mutex_unlock(&chip->mutex);
 	return err;




[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