diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-17 15:30:17 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-18 15:31:46 -0700 |
commit | ee09e9deefac842a66cbbd39fd2f03aff6e2a656 (patch) | |
tree | 1ae1efeb557ac8203b79b9a971204221fefabb56 /drivers | |
parent | 2f48b1d854e853b243fcd7e4f3f11d6ab5431bd7 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index c4cca27fb0d5..07720841a8d7 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -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; |