mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-07 22:34:18 +08:00
ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()
[ Upstream commitca459dfa7d
] 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@b4.vu> Fixes:9e15fae6c5
("ALSA: usb-audio: scarlett2: Allow bit-level access to config") Link: https://lore.kernel.org/r/def110c5c31dbdf0a7414d258838a0a31c0fab67.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0ba9386e19
commit
51d5697e1c
@ -1266,7 +1266,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
|
||||
|
Loading…
Reference in New Issue
Block a user