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)
committerJakub Kicinski <kuba@kernel.org>
Sat, 4 Feb 2023 03:22:20 +0000 (19:22 -0800)
commitcbe83191d40d8925b7a99969d037d2a0caf69294
tree4a046e9dc2de7686bf878fdc1951d2275f5bf8e2
parentce93fdb5f2ca5c9e2a9668411cc39091507f8dc9
bonding: fix error checking in bond_debug_reregister()

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>
drivers/net/bonding/bond_debugfs.c