bonding: fix error checking in bond_debug_reregister()
authorQi Zheng <zhengqi.arch@bytedance.com>
Thu, 2 Feb 2023 09:32:55 +0000 (17:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:17:58 +0000 (19:17 +0100)
commitd23385a200e6150aa46001feba5eeac541fcefc3
tree0924db5f02c8148f4eac7624ca2e3586f70303c3
parent11006d9d083f6ad700ee4a6fa7000bdb910c204e
bonding: fix error checking in bond_debug_reregister()

[ Upstream commit cbe83191d40d8925b7a99969d037d2a0caf69294 ]

Since commit ff9fb72bc077 ("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: ff9fb72bc077 ("debugfs: return error values, not NULL")
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/20230202093256.32458-1-zhengqi.arch@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/bonding/bond_debugfs.c