Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notifier: Return an error when a callback has already been registered
Return -EEXIST when a notifier callback has already been registered on a notifier chain. This should avoid any homegrown registration tracking at the callsite like https://lore.kernel.org/amd-gfx/[email protected] for example. This version is an alternative of https://lore.kernel.org/r/[email protected] which needed to touch every caller not checking the registration routine's return value. Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information