[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-40-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:54 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-crypto@...r.kernel.org
Subject: [PATCH v0 39/42] crypto: ccree - 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-crypto@...r.kernel.org
---
drivers/crypto/ccree/cc_fips.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fips.c
index 702aefc21447..de842da7d51c 100644
--- a/drivers/crypto/ccree/cc_fips.c
+++ b/drivers/crypto/ccree/cc_fips.c
@@ -146,7 +146,9 @@ int cc_fips_init(struct cc_drvdata *p_drvdata)
tasklet_init(&fips_h->tasklet, fips_dsr, (unsigned long)p_drvdata);
fips_h->drvdata = p_drvdata;
fips_h->nb.notifier_call = cc_ree_fips_failure;
- atomic_notifier_chain_register(&fips_fail_notif_chain, &fips_h->nb);
+
+ if (atomic_notifier_chain_register(&fips_fail_notif_chain, &fips_h->nb))
+ pr_warn("Failure notifier already registered\n");
cc_tee_handle_fips_error(p_drvdata);
--
2.29.2
Powered by blists - more mailing lists