Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73b8e217 authored by Qi Zheng's avatar Qi Zheng Committed by Greg Kroah-Hartman
Browse files

bonding: fix error checking in bond_debug_reregister()



[ Upstream commit cbe83191d40d8925b7a99969d037d2a0caf69294 ]

Since commit ff9fb72b ("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: ff9fb72b ("debugfs: return error values, not NULL")
Signed-off-by: default avatarQi Zheng <zhengqi.arch@bytedance.com>
Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/20230202093256.32458-1-zhengqi.arch@bytedance.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c89ddf13
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ void bond_debug_reregister(struct bonding *bond)

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