mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-26 12:22:43 -05:00
sky2: Remove redundant NULL check for debugfs_create_dir
Since debugfs_create_dir() returns ERR_PTR, IS_ERR() is enough to check whether the directory is successfully created. So remove the redundant NULL check. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Link: https://lore.kernel.org/r/20230817073017.350002-1-ruanjinjie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
2f48b1d854
commit
ee09e9deef
@@ -4528,7 +4528,7 @@ static __init void sky2_debug_init(void)
|
||||
struct dentry *ent;
|
||||
|
||||
ent = debugfs_create_dir("sky2", NULL);
|
||||
if (!ent || IS_ERR(ent))
|
||||
if (IS_ERR(ent))
|
||||
return;
|
||||
|
||||
sky2_debug = ent;
|
||||
|
||||
Reference in New Issue
Block a user