Skip to content

Commit ee09e9d

Browse files
Ruan Jinjiekuba-moo
authored andcommitted
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>
1 parent 2f48b1d commit ee09e9d

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/marvell

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/sky2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4528,7 +4528,7 @@ static __init void sky2_debug_init(void)
45284528
struct dentry *ent;
45294529

45304530
ent = debugfs_create_dir("sky2", NULL);
4531-
if (!ent || IS_ERR(ent))
4531+
if (IS_ERR(ent))
45324532
return;
45334533

45344534
sky2_debug = ent;

0 commit comments

Comments
 (0)