summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-10-13 13:26:53 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-18 07:55:02 +0300
commit62d6f3b7b85e9ba79c96bfd36f501f180908e623 (patch)
treef7c87ebde04faf3148ce301c8ee6bb312b024e30 /arch/sparc
parent776ca1543b5fe673aaf1beb244fcc2429d378083 (diff)
downloadlinux-62d6f3b7b85e9ba79c96bfd36f501f180908e623.tar.xz
sparc: vDSO: Silence an uninitialized variable warning
Smatch complains that "val" would be uninitialized if kstrtoul() fails. Fixes: 9a08862a5d2e ("vDSO for sparc") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/vdso/vma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c
index f51595f861b8..5eaff3c1aa0c 100644
--- a/arch/sparc/vdso/vma.c
+++ b/arch/sparc/vdso/vma.c
@@ -262,7 +262,9 @@ static __init int vdso_setup(char *s)
unsigned long val;
err = kstrtoul(s, 10, &val);
+ if (err)
+ return err;
vdso_enabled = val;
- return err;
+ return 0;
}
__setup("vdso=", vdso_setup);