Merge remote branch 'alsa/fixes' into fix/hda
[safe/jmp/linux-2.6] / sound / core / control_compat.c
index 9311ca3..368dc9c 100644 (file)
@@ -219,7 +219,8 @@ static int copy_ctl_value_from_user(struct snd_card *card,
                                    struct snd_ctl_elem_value32 __user *data32,
                                    int *typep, int *countp)
 {
-       int i, type, count, size;
+       int i, type, size;
+       int uninitialized_var(count);
        unsigned int indirect;
 
        if (copy_from_user(&data->id, &data32->id, sizeof(data->id)))
@@ -397,7 +398,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: