Re: [PATCH] char: misc: add missing #ifdef CONFIG_PROC_FS and error checking
From: Arnd Bergmann
Date: Mon Jul 29 2024 - 05:43:36 EST
On Mon, Jul 29, 2024, at 09:35, zhangjiao2 wrote:
> From: Zhang Jiao <zhangjiao2@xxxxxxxxxxxxxxxxxxxx>
>
> Add "#ifdef CONFIG_PROC_FS" to control misc proc create
> and give some error checking.
>
> Signed-off-by: Zhang Jiao <zhangjiao2@xxxxxxxxxxxxxxxxxxxx>
> ---
I don't think this is an improvement: proc_create_*() already
prints a warning about how exactly it went wrong when it does,
and it can usually just continue without it. However, failing
misc_init() is likely to prevent the system from booting.
Arnd