diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-24 02:07:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-24 02:07:38 -0400 |
commit | baba2e0d2bf5d68e4ec0d8a4d700724ef866249f (patch) | |
tree | 10853275f81b5db35d3dd73bcfc22acf8efa620d /sound | |
parent | d34bf1485192b9cedb7b0dec8988324099b6a0b1 (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')
-rw-r--r-- | sound/usb/mixer_quirks.c | 38 |
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) | |||
935 | 935 | ||
936 | static int snd_ebox44_create_mixer(struct usb_mixer_interface *mixer) | 936 | static int snd_ebox44_create_mixer(struct usb_mixer_interface *mixer) |
937 | { | 937 | { |
938 | snd_create_std_mono_ctl(mixer, 4, 1, 0x0, USB_MIXER_INV_BOOLEAN, | 938 | int err; |
939 | |||
940 | err = snd_create_std_mono_ctl(mixer, 4, 1, 0x0, USB_MIXER_INV_BOOLEAN, | ||
939 | "Headphone Playback Switch", NULL); | 941 | "Headphone Playback Switch", NULL); |
940 | snd_create_std_mono_ctl(mixer, 4, 2, 0x1, USB_MIXER_S16, | 942 | if (err < 0) |
943 | return err; | ||
944 | err = snd_create_std_mono_ctl(mixer, 4, 2, 0x1, USB_MIXER_S16, | ||
941 | "Headphone A Mix Playback Volume", NULL); | 945 | "Headphone A Mix Playback Volume", NULL); |
942 | snd_create_std_mono_ctl(mixer, 4, 2, 0x2, USB_MIXER_S16, | 946 | if (err < 0) |
947 | return err; | ||
948 | err = snd_create_std_mono_ctl(mixer, 4, 2, 0x2, USB_MIXER_S16, | ||
943 | "Headphone B Mix Playback Volume", NULL); | 949 | "Headphone B Mix Playback Volume", NULL); |
950 | if (err < 0) | ||
951 | return err; | ||
944 | 952 | ||
945 | snd_create_std_mono_ctl(mixer, 7, 1, 0x0, USB_MIXER_INV_BOOLEAN, | 953 | err = snd_create_std_mono_ctl(mixer, 7, 1, 0x0, USB_MIXER_INV_BOOLEAN, |
946 | "Output Playback Switch", NULL); | 954 | "Output Playback Switch", NULL); |
947 | snd_create_std_mono_ctl(mixer, 7, 2, 0x1, USB_MIXER_S16, | 955 | if (err < 0) |
956 | return err; | ||
957 | err = snd_create_std_mono_ctl(mixer, 7, 2, 0x1, USB_MIXER_S16, | ||
948 | "Output A Playback Volume", NULL); | 958 | "Output A Playback Volume", NULL); |
949 | snd_create_std_mono_ctl(mixer, 7, 2, 0x2, USB_MIXER_S16, | 959 | if (err < 0) |
960 | return err; | ||
961 | err = snd_create_std_mono_ctl(mixer, 7, 2, 0x2, USB_MIXER_S16, | ||
950 | "Output B Playback Volume", NULL); | 962 | "Output B Playback Volume", NULL); |
963 | if (err < 0) | ||
964 | return err; | ||
951 | 965 | ||
952 | snd_create_std_mono_ctl(mixer, 10, 1, 0x0, USB_MIXER_INV_BOOLEAN, | 966 | err = snd_create_std_mono_ctl(mixer, 10, 1, 0x0, USB_MIXER_INV_BOOLEAN, |
953 | "Input Capture Switch", NULL); | 967 | "Input Capture Switch", NULL); |
954 | snd_create_std_mono_ctl(mixer, 10, 2, 0x1, USB_MIXER_S16, | 968 | if (err < 0) |
969 | return err; | ||
970 | err = snd_create_std_mono_ctl(mixer, 10, 2, 0x1, USB_MIXER_S16, | ||
955 | "Input A Capture Volume", NULL); | 971 | "Input A Capture Volume", NULL); |
956 | snd_create_std_mono_ctl(mixer, 10, 2, 0x2, USB_MIXER_S16, | 972 | if (err < 0) |
973 | return err; | ||
974 | err = snd_create_std_mono_ctl(mixer, 10, 2, 0x2, USB_MIXER_S16, | ||
957 | "Input B Capture Volume", NULL); | 975 | "Input B Capture Volume", NULL); |
976 | if (err < 0) | ||
977 | return err; | ||
958 | 978 | ||
959 | return 0; | 979 | return 0; |
960 | } | 980 | } |