diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-04-24 08:24:39 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-04-24 08:24:44 +0200 |
commit | 10635d2d2a4c95044217fe8ea6e5f5451fd07ae8 (patch) | |
tree | c4382d0e6897de33df2f56502e30eb2aae99c84a /sound/usb/mixer_quirks.c | |
parent | 36dbae9945322e660795e73ffc8ed8ae4f25d13d (diff) | |
parent | 977dfef40c8996b69afe23a9094d184049efb7bb (diff) | |
download | lwn-10635d2d2a4c95044217fe8ea6e5f5451fd07ae8.tar.gz lwn-10635d2d2a4c95044217fe8ea6e5f5451fd07ae8.zip |
Merge branch 'for-linus' into for-next
Back-merge 5.7-rc devel branch for further changes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer_quirks.c')
-rw-r--r-- | sound/usb/mixer_quirks.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index f0302ad7f5a0..bdff8674942e 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -1509,11 +1509,15 @@ static int snd_microii_spdif_default_get(struct snd_kcontrol *kcontrol, /* use known values for that card: interface#1 altsetting#1 */ iface = usb_ifnum_to_if(chip->dev, 1); - if (!iface || iface->num_altsetting < 2) - return -EINVAL; + if (!iface || iface->num_altsetting < 2) { + err = -EINVAL; + goto end; + } alts = &iface->altsetting[1]; - if (get_iface_desc(alts)->bNumEndpoints < 1) - return -EINVAL; + if (get_iface_desc(alts)->bNumEndpoints < 1) { + err = -EINVAL; + goto end; + } ep = get_endpoint(alts, 0)->bEndpointAddress; err = snd_usb_ctl_msg(chip->dev, |