projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e08190e
)
bonding: use IS_ERR instead of NULL check in bond_create_debugfs
author
Zhengchao Shao
<shaozhengchao@huawei.com>
Thu, 10 Aug 2023 13:50:04 +0000
(21:50 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 11 Aug 2023 10:10:55 +0000
(11:10 +0100)
Because debugfs_create_dir returns ERR_PTR, so IS_ERR should be used to
check whether the directory is successfully created.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/net/bonding/bond_debugfs.c
b/drivers/net/bonding/bond_debugfs.c
index 94c2f35e3bfcd0d7c29f060be7189c3bbaa72be5..50e48136c6977fe895ca6fc87b2ef3d9c50b7735 100644
(file)
--- a/
drivers/net/bonding/bond_debugfs.c
+++ b/
drivers/net/bonding/bond_debugfs.c
@@
-88,7
+88,7
@@
void __init bond_create_debugfs(void)
{
bonding_debug_root = debugfs_create_dir("bonding", NULL);
- if (
!bonding_debug_root
)
+ if (
IS_ERR(bonding_debug_root)
)
pr_warn("Warning: Cannot create bonding directory in debugfs\n");
}