]> Pileus Git - ~andy/linux/blobdiff - sound/drivers/opl3/opl3_oss.c
Merge branch 'topic/pcxhr' into for-linus
[~andy/linux] / sound / drivers / opl3 / opl3_oss.c
index 239347f26154ba381907874a08a3d6bd2a2da881..a54b1dc5cc7859f7b10316aed9fce1af5b9c391f 100644 (file)
@@ -162,7 +162,8 @@ static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
        struct snd_opl3 *opl3 = closure;
        int err;
 
-       snd_assert(arg != NULL, return -ENXIO);
+       if (snd_BUG_ON(!arg))
+               return -ENXIO;
 
        if ((err = snd_opl3_synth_setup(opl3)) < 0)
                return err;
@@ -184,7 +185,8 @@ static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg)
 {
        struct snd_opl3 *opl3;
 
-       snd_assert(arg != NULL, return -ENXIO);
+       if (snd_BUG_ON(!arg))
+               return -ENXIO;
        opl3 = arg->private_data;
 
        snd_opl3_synth_cleanup(opl3);
@@ -206,7 +208,8 @@ static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
        char name[32];
        int err, type;
 
-       snd_assert(arg != NULL, return -ENXIO);
+       if (snd_BUG_ON(!arg))
+               return -ENXIO;
        opl3 = arg->private_data;
 
        if (format == FM_PATCH)
@@ -217,14 +220,14 @@ static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
                return -EINVAL;
 
        if (count < (int)sizeof(sbi)) {
-               snd_printk("FM Error: Patch record too short\n");
+               snd_printk(KERN_ERR "FM Error: Patch record too short\n");
                return -EINVAL;
        }
        if (copy_from_user(&sbi, buf, sizeof(sbi)))
                return -EFAULT;
 
        if (sbi.channel < 0 || sbi.channel >= SBFM_MAXINSTR) {
-               snd_printk("FM Error: Invalid instrument number %d\n",
+               snd_printk(KERN_ERR "FM Error: Invalid instrument number %d\n",
                           sbi.channel);
                return -EINVAL;
        }
@@ -246,11 +249,14 @@ static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
 {
        struct snd_opl3 *opl3;
 
-       snd_assert(arg != NULL, return -ENXIO);
+       if (snd_BUG_ON(!arg))
+               return -ENXIO;
        opl3 = arg->private_data;
        switch (cmd) {
                case SNDCTL_FM_LOAD_INSTR:
-                       snd_printk("OPL3: Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. Fix the program.\n");
+                       snd_printk(KERN_ERR "OPL3: "
+                                  "Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. "
+                                  "Fix the program.\n");
                        return -EINVAL;
 
                case SNDCTL_SYNTH_MEMAVL:
@@ -271,7 +277,8 @@ static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg)
 {
        struct snd_opl3 *opl3;
 
-       snd_assert(arg != NULL, return -ENXIO);
+       if (snd_BUG_ON(!arg))
+               return -ENXIO;
        opl3 = arg->private_data;
 
        return 0;