commit | 5abb065dca7301de90b7c44bbcdc378e49e4d362 | [log] [tgz] |
---|---|---|
author | Borislav Petkov <bp@suse.de> | Wed Dec 01 22:28:14 2021 +0100 |
committer | Borislav Petkov <bp@suse.de> | Wed Dec 29 10:37:33 2021 +0100 |
tree | 2bf97dbf77f38ff9e39921a1d79bb61e972f5951 | |
parent | fc74e0a40e4f9fd0468e34045b0c45bba11dcbb2 [diff] |
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/20210512013058.6827-1-mukul.joshi@amd.com for example. This version is an alternative of https://lore.kernel.org/r/20211108101157.15189-1-bp@alien8.de which needed to touch every caller not checking the registration routine's return value. Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/YcSWNdUBS8A2ZB3s@zn.tnic