[PATCH v0 27/42] bus: brcmstb_gisb: Check notifier registration return value

From: Borislav Petkov
Date: Mon Nov 08 2021 - 05:15:25 EST


From: Borislav Petkov <bp@xxxxxxx>

Avoid homegrown notifier registration checks.

No functional changes.

Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Cc: bcm-kernel-feedback-list@xxxxxxxxxxxx
---
drivers/bus/brcmstb_gisb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 4c2f7d61cb9b..1c0180ebe6a7 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -490,8 +490,10 @@ static int __init brcmstb_gisb_arb_probe(struct platform_device *pdev)

if (list_is_singular(&brcmstb_gisb_arb_device_list)) {
register_die_notifier(&gisb_die_notifier);
- atomic_notifier_chain_register(&panic_notifier_list,
- &gisb_panic_notifier);
+
+ if (atomic_notifier_chain_register(&panic_notifier_list,
+ &gisb_panic_notifier))
+ pr_warn("GISB Panic notifier already registered\n");
}

dev_info(&pdev->dev, "registered irqs: %d, %d\n",
--
2.29.2