Skip to content

Commit

Permalink
sparc: vDSO: Silence an uninitialized variable warning
Browse files Browse the repository at this point in the history
Smatch complains that "val" would be uninitialized if kstrtoul() fails.

Fixes: 9a08862 ("vDSO for sparc")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Oct 18, 2018
1 parent 776ca15 commit 62d6f3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/sparc/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 62d6f3b

Please sign in to comment.