mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
bonding: use IS_ERR instead of NULL check in bond_create_debugfs
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>
This commit is contained in:
parent
e08190ef51
commit
57647e6fdf
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue