Commit b08b6ae8 authored by Jesse Barnes's avatar Jesse Barnes Committed by Linus Torvalds

[PATCH] fix uninitialized warnings in mempolicy.c

err may be used uninitialized in mempolicy.c in both compat_set_mempolicy
and compat_mbind.  This patch fixes that by setting them both to 0.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea0547ed
...@@ -557,7 +557,7 @@ asmlinkage long compat_get_mempolicy(int __user *policy, ...@@ -557,7 +557,7 @@ asmlinkage long compat_get_mempolicy(int __user *policy,
asmlinkage long compat_set_mempolicy(int mode, compat_ulong_t __user *nmask, asmlinkage long compat_set_mempolicy(int mode, compat_ulong_t __user *nmask,
compat_ulong_t maxnode) compat_ulong_t maxnode)
{ {
long err; long err = 0;
unsigned long __user *nm = NULL; unsigned long __user *nm = NULL;
unsigned long nr_bits, alloc_size; unsigned long nr_bits, alloc_size;
DECLARE_BITMAP(bm, MAX_NUMNODES); DECLARE_BITMAP(bm, MAX_NUMNODES);
...@@ -581,7 +581,7 @@ asmlinkage long compat_mbind(compat_ulong_t start, compat_ulong_t len, ...@@ -581,7 +581,7 @@ asmlinkage long compat_mbind(compat_ulong_t start, compat_ulong_t len,
compat_ulong_t mode, compat_ulong_t __user *nmask, compat_ulong_t mode, compat_ulong_t __user *nmask,
compat_ulong_t maxnode, compat_ulong_t flags) compat_ulong_t maxnode, compat_ulong_t flags)
{ {
long err; long err = 0;
unsigned long __user *nm = NULL; unsigned long __user *nm = NULL;
unsigned long nr_bits, alloc_size; unsigned long nr_bits, alloc_size;
DECLARE_BITMAP(bm, MAX_NUMNODES); DECLARE_BITMAP(bm, MAX_NUMNODES);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment