Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0057ca4 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds
Browse files

arch/x86/mm/kmemcheck/kmemcheck.c: use kstrtoint() instead of sscanf()



Kmemcheck should use the preferred interface for parsing command line
arguments, kstrto*(), rather than sscanf() itself.  Use it
appropriately.

Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Cc: Vegard Nossum <vegardno@ifi.uio.no>
Acked-by: default avatarPekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e39435ce
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -78,10 +78,16 @@ early_initcall(kmemcheck_init);
 */
static int __init param_kmemcheck(char *str)
{
	int val;
	int ret;

	if (!str)
		return -EINVAL;

	sscanf(str, "%d", &kmemcheck_enabled);
	ret = kstrtoint(str, 0, &val);
	if (ret)
		return ret;
	kmemcheck_enabled = val;
	return 0;
}