On Tue, Sep 03, 2024 at 10:36:07PM +0800, Li Zetao wrote: > Since the debugfs_create_dir() never returns a null pointer, checking > the return value for a null pointer is redundant, and using IS_ERR is > safe enough. > > Signed-off-by: Li Zetao <lizetao1@xxxxxxxxxx> > --- > drivers/media/common/siano/smsdvb-debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c > index 73990e469df9..325d674c74d9 100644 > --- a/drivers/media/common/siano/smsdvb-debugfs.c > +++ b/drivers/media/common/siano/smsdvb-debugfs.c > @@ -411,7 +411,7 @@ void smsdvb_debugfs_register(void) > * subsystem. > */ > d = debugfs_create_dir("smsdvb", usb_debug_root); > - if (IS_ERR_OR_NULL(d)) { > + if (IS_ERR(d)) { > pr_err("Couldn't create sysfs node for smsdvb\n"); Again, just do not check. thanks, greg k-h