Commit d8d8897d authored by Geoffrey D. Bennett's avatar Geoffrey D. Bennett Committed by Greg Kroah-Hartman
Browse files

ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put()



[ Upstream commit 04f8f053 ]

Ensure the value passed to scarlett2_mixer_ctl_put() is between 0 and
SCARLETT2_MIXER_MAX_VALUE so we don't attempt to access outside
scarlett2_mixer_values[].

Signed-off-by: default avatarGeoffrey D. Bennett <g@b4.vu>
Fixes: 9e4d5c1b ("ALSA: usb-audio: Scarlett Gen 2 mixer interface")
Link: https://lore.kernel.org/r/3b19fb3da641b587749b85fe1daa1b4e696c0c1b.1703001053.git.g@b4.vu


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cda7762b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment