X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fcore%2Fcontrol_compat.c;h=6101259ad860e1b05260f36faa42758944ebc088;hb=95dfec6ae1cb8c03406aac612a5642cbddb676b3;hp=ab48962c48ce9716973392f2a426ab540e424b24;hpb=2dc94310bd94d0906febea7d0f7c188da620c952;p=linux-2.6 diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index ab48962c48..6101259ad8 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))) @@ -392,7 +393,7 @@ enum { static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg) { struct snd_ctl_file *ctl; - struct list_head *list; + struct snd_kctl_ioctl *p; void __user *argp = compat_ptr(arg); int err; @@ -427,8 +428,7 @@ static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, uns } down_read(&snd_ioctl_rwsem); - list_for_each(list, &snd_control_compat_ioctls) { - struct snd_kctl_ioctl *p = list_entry(list, struct snd_kctl_ioctl, list); + list_for_each_entry(p, &snd_control_compat_ioctls, list) { if (p->fioctl) { err = p->fioctl(ctl->card, ctl, cmd, arg); if (err != -ENOIOCTLCMD) {