aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/ice1712/ak4xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ice1712/ak4xxx.c')
-rw-r--r--sound/pci/ice1712/ak4xxx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c
index dab31b2756a..3981823f909 100644
--- a/sound/pci/ice1712/ak4xxx.c
+++ b/sound/pci/ice1712/ak4xxx.c
@@ -24,7 +24,9 @@
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/slab.h>
#include <linux/init.h>
+#include <linux/module.h>
#include <sound/core.h>
#include <sound/initval.h>
#include "ice1712.h"
@@ -59,7 +61,8 @@ static void snd_ice1712_akm4xxx_write(struct snd_akm4xxx *ak, int chip,
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
struct snd_ice1712 *ice = ak->private_data[0];
- snd_assert(chip >= 0 && chip < 4, return);
+ if (snd_BUG_ON(chip < 0 || chip >= 4))
+ return;
tmp = snd_ice1712_gpio_read(ice);
tmp |= priv->add_flags;