From: Dan Carpenter Date: Wed, 14 Aug 2013 09:09:31 +0000 (+0300) Subject: x86/boot: Fix a sanity check in printf.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5b8fafcac6242bf914334d3ae9dbe921ad8d4634;p=linux-beck.git x86/boot: Fix a sanity check in printf.c Prior to 9b706aee7d ("x86: trivial printk optimizations") this was 36 because it had 26 characters and 10 digits but now it's just 16 hex digits so the sanity check needs updated. This function is always called with a valid "base" so it doesn't make a difference to how the kernel works, it's just a cleanup. Reported-by: Alexey Petrenko Signed-off-by: Dan Carpenter Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index cdac91ca55d3..565083c16e5c 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c @@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision, locase = (type & SMALL); if (type & LEFT) type &= ~ZEROPAD; - if (base < 2 || base > 36) + if (base < 2 || base > 16) return NULL; c = (type & ZEROPAD) ? '0' : ' '; sign = 0;