[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-30-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:44 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v0 29/42] arm64: 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: linux-arm-kernel@...ts.infradead.org
---
arch/arm64/kernel/setup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index be5f85b0a24d..e66af9de7cd7 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -440,8 +440,10 @@ static struct notifier_block arm64_panic_block = {
static int __init register_arm64_panic_block(void)
{
- atomic_notifier_chain_register(&panic_notifier_list,
- &arm64_panic_block);
+ if (atomic_notifier_chain_register(&panic_notifier_list,
+ &arm64_panic_block))
+ pr_warn("Panic notifier already registered\n");
+
return 0;
}
device_initcall(register_arm64_panic_block);
--
2.29.2
Powered by blists - more mailing lists