summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-24 08:07:38 +0200
committerTakashi Iwai <tiwai@suse.de>2012-04-24 08:07:38 +0200
commitbaba2e0d2bf5d68e4ec0d8a4d700724ef866249f (patch)
tree10853275f81b5db35d3dd73bcfc22acf8efa620d /sound/usb
parentd34bf1485192b9cedb7b0dec8988324099b6a0b1 (diff)
ALSA: usb-audio: Add missing error checks in snd_ebox44_create_mixer()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer_quirks.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index b44df6e5109b..12125ca7167f 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -935,26 +935,46 @@ static int snd_ftu_create_mixer(struct usb_mixer_interface *mixer)
static int snd_ebox44_create_mixer(struct usb_mixer_interface *mixer)
{
- snd_create_std_mono_ctl(mixer, 4, 1, 0x0, USB_MIXER_INV_BOOLEAN,
+ int err;
+
+ err = snd_create_std_mono_ctl(mixer, 4, 1, 0x0, USB_MIXER_INV_BOOLEAN,
"Headphone Playback Switch", NULL);
- snd_create_std_mono_ctl(mixer, 4, 2, 0x1, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 4, 2, 0x1, USB_MIXER_S16,
"Headphone A Mix Playback Volume", NULL);
- snd_create_std_mono_ctl(mixer, 4, 2, 0x2, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 4, 2, 0x2, USB_MIXER_S16,
"Headphone B Mix Playback Volume", NULL);
+ if (err < 0)
+ return err;
- snd_create_std_mono_ctl(mixer, 7, 1, 0x0, USB_MIXER_INV_BOOLEAN,
+ err = snd_create_std_mono_ctl(mixer, 7, 1, 0x0, USB_MIXER_INV_BOOLEAN,
"Output Playback Switch", NULL);
- snd_create_std_mono_ctl(mixer, 7, 2, 0x1, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 7, 2, 0x1, USB_MIXER_S16,
"Output A Playback Volume", NULL);
- snd_create_std_mono_ctl(mixer, 7, 2, 0x2, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 7, 2, 0x2, USB_MIXER_S16,
"Output B Playback Volume", NULL);
+ if (err < 0)
+ return err;
- snd_create_std_mono_ctl(mixer, 10, 1, 0x0, USB_MIXER_INV_BOOLEAN,
+ err = snd_create_std_mono_ctl(mixer, 10, 1, 0x0, USB_MIXER_INV_BOOLEAN,
"Input Capture Switch", NULL);
- snd_create_std_mono_ctl(mixer, 10, 2, 0x1, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 10, 2, 0x1, USB_MIXER_S16,
"Input A Capture Volume", NULL);
- snd_create_std_mono_ctl(mixer, 10, 2, 0x2, USB_MIXER_S16,
+ if (err < 0)
+ return err;
+ err = snd_create_std_mono_ctl(mixer, 10, 2, 0x2, USB_MIXER_S16,
"Input B Capture Volume", NULL);
+ if (err < 0)
+ return err;
return 0;
}