summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorGeoffrey D. Bennett <g@b4.vu>2023-12-20 04:07:00 +1030
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-25 15:27:37 -0800
commit6232b7505c2ca08144b550ca50dc25e60e0002f3 (patch)
tree7be074bf9e30c582cbef61815bf81fa36dd16c55 /sound
parent74341edb7d180f768010f3991242eefa97cd808f (diff)
downloadlinux-6232b7505c2ca08144b550ca50dc25e60e0002f3.tar.gz
linux-6232b7505c2ca08144b550ca50dc25e60e0002f3.tar.bz2
linux-6232b7505c2ca08144b550ca50dc25e60e0002f3.zip
ALSA: scarlett2: Add missing error check to scarlett2_config_save()
[ Upstream commit 5f6ff6931a1c0065a55448108940371e1ac8075f ] scarlett2_config_save() was ignoring the return value from scarlett2_usb(). As this function is not called from user-space we can't return the error, so call usb_audio_err() instead. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/bf0a15332d852d7825fa6da87d2a0d9c0b702053.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer_scarlett_gen2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index 9d11bb08667e..3da0d3167ebf 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -1337,9 +1337,11 @@ static void scarlett2_config_save(struct usb_mixer_interface *mixer)
{
__le32 req = cpu_to_le32(SCARLETT2_USB_CONFIG_SAVE);
- scarlett2_usb(mixer, SCARLETT2_USB_DATA_CMD,
- &req, sizeof(u32),
- NULL, 0);
+ int err = scarlett2_usb(mixer, SCARLETT2_USB_DATA_CMD,
+ &req, sizeof(u32),
+ NULL, 0);
+ if (err < 0)
+ usb_audio_err(mixer->chip, "config save failed: %d\n", err);
}
/* Delayed work to save config */