Message ID | 20230810135007.3834770-3-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 57647e6fdf174e3c84072a39d901036f867e4192 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | bonding: do some cleanups in bond driver | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/apply | success | Patch already applied to net-next |
diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c index 94c2f35e3bfc..50e48136c697 100644 --- 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"); }
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> --- drivers/net/bonding/bond_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)