Skip to content

Commit cbe8319

Browse files
Qi Zhengkuba-moo
authored andcommitted
bonding: fix error checking in bond_debug_reregister()
Since commit ff9fb72 ("debugfs: return error values, not NULL") changed return value of debugfs_rename() in error cases from %NULL to %ERR_PTR(-ERROR), we should also check error values instead of NULL. Fixes: ff9fb72 ("debugfs: return error values, not NULL") Signed-off-by: Qi Zheng <[email protected]> Acked-by: Jay Vosburgh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ce93fdb commit cbe8319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/bonding/bond_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void bond_debug_reregister(struct bonding *bond)
7676

7777
d = debugfs_rename(bonding_debug_root, bond->debug_dir,
7878
bonding_debug_root, bond->dev->name);
79-
if (d) {
79+
if (!IS_ERR(d)) {
8080
bond->debug_dir = d;
8181
} else {
8282
netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n");

0 commit comments

Comments
 (0)