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

Russell King (Oracle) linux at armlinux.org.uk
Thu Aug 31 07:17:44 PDT 2023


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/20180601111004.1670-3-gregkh@linuxfoundation.org/T/

Thanks.

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



More information about the Linux-mediatek mailing list