2023-09-01 12:16:03

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: [PATCH net 0/3] wifi: Fix the NULL vs IS_ERR() bugs for debugfs_create_dir()

On Thu, Aug 31, 2023 at 10:13:44PM +0800, Jinjie Ruan wrote:
> Since debugfs_create_dir() returns ERR_PTR and never return NULL, So use
> IS_ERR() to check it instead of checking NULL.

It is preferred that the return value from debugfs functions is _not_
checked.

See for example:

https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!