]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/core/control_compat.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mv-sheeva.git] / sound / core / control_compat.c
index 6101259ad860e1b05260f36faa42758944ebc088..426874429a5e088cf50414f6ab1f76dd7f8d1fd2 100644 (file)
@@ -21,6 +21,7 @@
 /* this file included from control.c */
 
 #include <linux/compat.h>
+#include <linux/slab.h>
 
 struct snd_ctl_elem_list32 {
        u32 offset;
@@ -398,7 +399,8 @@ static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, uns
        int err;
 
        ctl = file->private_data;
-       snd_assert(ctl && ctl->card, return -ENXIO);
+       if (snd_BUG_ON(!ctl || !ctl->card))
+               return -ENXIO;
 
        switch (cmd) {
        case SNDRV_CTL_IOCTL_PVERSION: