summaryrefslogtreecommitdiffstats
path: root/sound/isa/gus
diff options
context:
space:
mode:
authorKangjie Lu <kjlu@umn.edu>2018-12-25 19:40:51 -0600
committerTakashi Iwai <tiwai@suse.de>2019-01-07 11:54:56 +0100
commit0f25e000cb4398081748e54f62a902098aa79ec1 (patch)
tree55baba48be93633566a7b0dbcf920f3ba9a98a93 /sound/isa/gus
parent4bccb403f2ca06718ac3a3d9b02e89ca4e823d9f (diff)
downloadblackbird-op-linux-0f25e000cb4398081748e54f62a902098aa79ec1.tar.gz
blackbird-op-linux-0f25e000cb4398081748e54f62a902098aa79ec1.zip
ALSA: gus: add a check of the status of snd_ctl_add
snd_ctl_add() could fail, so let's check its status and issue an error message if it indeed fails. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus')
-rw-r--r--sound/isa/gus/gus_main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 3b8a0c880db5..33c8b66d5c8a 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -92,8 +92,17 @@ static const struct snd_kcontrol_new snd_gus_joystick_control = {
static void snd_gus_init_control(struct snd_gus_card *gus)
{
- if (!gus->ace_flag)
- snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus));
+ int ret;
+
+ if (!gus->ace_flag) {
+ ret =
+ snd_ctl_add(gus->card,
+ snd_ctl_new1(&snd_gus_joystick_control,
+ gus));
+ if (ret)
+ snd_printk(KERN_ERR "gus: snd_ctl_add failed: %d\n",
+ ret);
+ }
}
/*
OpenPOWER on IntegriCloud