[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v0 02/42] xen/x86: Check notifier registration return value



From: Borislav Petkov <bp@xxxxxxx>

Avoid homegrown notifier registration checks.

No functional changes.

Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
---
 arch/x86/xen/enlighten.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 95d970359e17..2264dd6e157f 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -354,7 +354,9 @@ static struct notifier_block xen_panic_block = {
 
 int xen_panic_handler_init(void)
 {
-       atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
+       if (atomic_notifier_chain_register(&panic_notifier_list, 
&xen_panic_block))
+               pr_warn("Xen panic notifier already registered\n");
+
        return 0;
 }
 
-- 
2.29.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.