* [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir
@ 2023-08-17 7:30 Ruan Jinjie
2023-08-17 8:03 ` Leon Romanovsky
2023-08-19 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ruan Jinjie @ 2023-08-17 7:30 UTC (permalink / raw)
To: netdev, Mirko Lindner, Stephen Hemminger, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: ruanjinjie
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>
---
drivers/net/ethernet/marvell/sky2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir
2023-08-17 7:30 [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir Ruan Jinjie
@ 2023-08-17 8:03 ` Leon Romanovsky
2023-08-19 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-08-17 8:03 UTC (permalink / raw)
To: Ruan Jinjie
Cc: netdev, Mirko Lindner, Stephen Hemminger, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
On Thu, Aug 17, 2023 at 03:30:17PM +0800, Ruan Jinjie wrote:
> 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>
> ---
> drivers/net/ethernet/marvell/sky2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir
2023-08-17 7:30 [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir Ruan Jinjie
2023-08-17 8:03 ` Leon Romanovsky
@ 2023-08-19 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-19 0:10 UTC (permalink / raw)
To: Ruan Jinjie; +Cc: netdev, mlindner, stephen, davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 17 Aug 2023 15:30:17 +0800 you wrote:
> 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>
> ---
> drivers/net/ethernet/marvell/sky2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] sky2: Remove redundant NULL check for debugfs_create_dir
https://git.kernel.org/netdev/net-next/c/ee09e9deefac
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-19 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 7:30 [PATCH net-next] sky2: Remove redundant NULL check for debugfs_create_dir Ruan Jinjie
2023-08-17 8:03 ` Leon Romanovsky
2023-08-19 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).