[ALSA] copy_ctl_value_from_user() warning fix
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 14 Dec 2007 11:13:12 +0000 (12:13 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:29:34 +0000 (17:29 +0100)
sound/core/control_compat.c: In function 'copy_ctl_value_from_user':
sound/core/control_compat.c:222: warning: 'count' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/core/control_compat.c

index 9311ca397bbc20ed62d3c5e092dd6df5ed3b1d8f..6101259ad860e1b05260f36faa42758944ebc088 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)))