diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:17:17 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:17:17 +0200 |
| commit | dd5597245d35cfbb0890b8a868028aa1d2018701 (patch) | |
| tree | 865b93bf83987840fd763bf8a3d1c615ccda2f7b /sound/usb/mixer.c | |
| parent | 551b6729578a8981c46af964c10bf7d5d9ddca83 (diff) | |
| parent | f75aef392f869018f78cfedf3c320a6b3fcfda6b (diff) | |
Merge 5.9-rc3 into char-misc-next
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/mixer.c')
| -rw-r--r-- | sound/usb/mixer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 6b0f3a8469ef..81e987eaf063 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2371,7 +2371,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, int num_ins; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; - int i, err, nameid, type, len; + int i, err, nameid, type, len, val; const struct procunit_info *info; const struct procunit_value_info *valinfo; const struct usbmix_name_map *map; @@ -2474,6 +2474,12 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, break; } + err = get_cur_ctl_value(cval, cval->control << 8, &val); + if (err < 0) { + usb_mixer_elem_info_free(cval); + return -EINVAL; + } + kctl = snd_ctl_new1(&mixer_procunit_ctl, cval); if (!kctl) { usb_mixer_elem_info_free(cval); |
