[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-6-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:20 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH v0 05/42] dca: 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>
---
drivers/dca/dca-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
index c40c2ebfdae9..3e8f52214652 100644
--- a/drivers/dca/dca-core.c
+++ b/drivers/dca/dca-core.c
@@ -428,7 +428,8 @@ EXPORT_SYMBOL_GPL(unregister_dca_provider);
*/
void dca_register_notify(struct notifier_block *nb)
{
- blocking_notifier_chain_register(&dca_provider_chain, nb);
+ if (blocking_notifier_chain_register(&dca_provider_chain, nb))
+ pr_warn("dca provider notifier already registered\n");
}
EXPORT_SYMBOL_GPL(dca_register_notify);
--
2.29.2
Powered by blists - more mailing lists