Re: [PATCH] x86/tsc: Fix early boot crash with bare tsc_early_khz parameter

From: Dave Hansen

Date: Tue Nov 10 2026 - 14:45:41 EST


On 11/10/26 07:05, Thorsten Blum wrote:
> static int __init tsc_early_khz_setup(char *buf)
> {
> + if (!buf)
> + return -EINVAL;
> +
> return kstrtouint(buf, 0, &tsc_early_khz);
> }

This _seems_ like the kind of thing that should ideally just be done in
kstrtouint().

Is there a reason we can't just do what kstrtobool() does when handed
buf=NULL?