Skip to content

Commit

Permalink
[ALSA] copy_ctl_value_from_user() warning fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 6b587ef commit 5050b09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/core/control_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 5050b09

Please sign in to comment.