Patch "ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()" 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: scarlett2: Add missing error check to scarlett2_usb_set_config()

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-scarlett2-add-missing-error-check-to-scarlett2_.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.



commit 8c9c83bf9cbbc4014870bedf3ecb2238f461bf45
Author: Geoffrey D. Bennett <g@xxxxx>
Date:   Wed Dec 20 04:07:21 2023 +1030

    ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()
    
    [ Upstream commit ca459dfa7d4ed9098fcf13e410963be6ae9b6bf3 ]
    
    scarlett2_usb_set_config() calls scarlett2_usb_get() but was not
    checking the result. Return the error if it fails rather than
    continuing with an invalid value.
    
    Signed-off-by: Geoffrey D. Bennett <g@xxxxx>
    Fixes: 9e15fae6c51a ("ALSA: usb-audio: scarlett2: Allow bit-level access to config")
    Link: https://lore.kernel.org/r/def110c5c31dbdf0a7414d258838a0a31c0fab67.1703001053.git.g@xxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index 3da0d3167ebf..94704581865b 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -1390,7 +1390,10 @@ static int scarlett2_usb_set_config(
 		size = 1;
 		offset = config_item->offset;
 
-		scarlett2_usb_get(mixer, offset, &tmp, 1);
+		err = scarlett2_usb_get(mixer, offset, &tmp, 1);
+		if (err < 0)
+			return err;
+
 		if (value)
 			tmp |= (1 << index);
 		else




[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