[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-4-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:18 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: openipmi-developer@...ts.sourceforge.net
Subject: [PATCH v0 03/42] impi: Check notifier registration return value
From: Borislav Petkov <bp@...e.de>
Avoid homegrown notifier registration checks.
No functional changes.
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: openipmi-developer@...ts.sourceforge.net
---
drivers/char/ipmi/ipmi_msghandler.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index deed355422f4..9df360b53a90 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -5381,7 +5381,8 @@ static int ipmi_init_msghandler(void)
timer_setup(&ipmi_timer, ipmi_timeout, 0);
mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
- atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+ if (atomic_notifier_chain_register(&panic_notifier_list, &panic_block))
+ pr_warn("IPMI panic notifier already registered\n");
initialized = true;
--
2.29.2
Powered by blists - more mailing lists