X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fcore%2Fcontrol_compat.c;h=368dc9c4aef8d905eff9eb4fb780abedf53fca04;hb=6d80e53f0056178c63fa8fbf3e8de40fb4df5f50;hp=9311ca397bbc20ed62d3c5e092dd6df5ed3b1d8f;hpb=9cdd79c9b99873d600d397fda012fc3f57cc2776;p=linux-2.6-omap-h63xx.git diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index 9311ca397bb..368dc9c4aef 100644 --- a/sound/core/control_compat.c +++ b/sound/core/control_compat.c @@ -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: