[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-31-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:45 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-tegra@...r.kernel.or
Subject: [PATCH v0 30/42] soc/tegra: 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-tegra@...r.kernel.or
---
drivers/soc/tegra/ari-tegra186.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/tegra/ari-tegra186.c b/drivers/soc/tegra/ari-tegra186.c
index 02577853ec49..a25e1b7497e0 100644
--- a/drivers/soc/tegra/ari-tegra186.c
+++ b/drivers/soc/tegra/ari-tegra186.c
@@ -72,8 +72,11 @@ static struct notifier_block tegra186_ari_panic_nb = {
static int __init tegra186_ari_init(void)
{
- if (of_machine_is_compatible("nvidia,tegra186"))
- atomic_notifier_chain_register(&panic_notifier_list, &tegra186_ari_panic_nb);
+ if (of_machine_is_compatible("nvidia,tegra186")) {
+ if (atomic_notifier_chain_register(&panic_notifier_list,
+ &tegra186_ari_panic_nb))
+ pr_warn("Panic notifier already registered\n");
+ }
return 0;
}
--
2.29.2
Powered by blists - more mailing lists