net: devlink: add WARN_ON_ONCE to check return value of unregister_netdevice_notifier_net() call
Subsystems (2)
PATCH 1/1 net: devlink: add WARN_ON_ONCE to check return value of unregister_netdevice_notifier_net() call
From: Jiri Pirko <[email protected]>
As the return value is not 0 only in case there is no such notifier block registered, add a WARN_ON_ONCE() to yell about it.
--- net/core/devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/devlink.c +2 -2
@@ -9907,8 +9907,8 @@ void devlink_free(struct devlink *devlink)xa_destroy (&devlink->snapshot_ids); -unregister_netdevice_notifier_net (devlink_net (devlink), - &devlink->netdevice_nb); +WARN_ON_ONCE (unregister_netdevice_notifier_net (devlink_net (devlink), + &devlink->netdevice_nb));xa_erase (&devlinks, devlink->index);
Signature · 1 line
2.37.3
Quoted 7 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
As the return value is not 0 only in case there is no such notifier block registered, add a
WARN_ON_ONCE()to yell about it.Suggested-by Ido Schimmel <[email protected]>Signed-off-by Jiri Pirko <[email protected]>
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:
Quoted 9 lines · On Fri, 25 Nov 2022 11:02:55 +0100 you wrote:
From: Jiri Pirko <[email protected]>
As the return value is not 0 only in case there is no such notifier block registered, add a
WARN_ON_ONCE()to yell about it.Suggested-by Ido Schimmel <[email protected]>Signed-off-by Jiri Pirko <[email protected]>[...]
Here is the summary with links:
- [net-next] net: devlink: add WARN_ON_ONCE to check return value of unregister_netdevice_notifier_net() call
https://git.kernel.org/netdev/net-next/c/7666dbec7268
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html