summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-04-20 11:28:19 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-04-30 08:19:32 +0300
commitb2d7e8bcaab7d1d931369984e2bae952247a1412 (patch)
tree7675f7bd6836c1e3d28fe25ff7a1a9d78f8adb47 /drivers/char
parent9c3d6497fbfa0911d4cd6f261762a0a7af29566a (diff)
downloadlinux-b2d7e8bcaab7d1d931369984e2bae952247a1412.tar.xz
hwrng: cctrng - Remove unnecessary FIPS ifdef
This patch removes the unnecessary FIPS ifdef in cctrng. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Hadar Gat <hadar.gat@arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/cctrng.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index e82716c12c3a..49fb65a221f3 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -331,13 +331,11 @@ void cc_trng_compwork_handler(struct work_struct *w)
ehr_valid = CC_REG_FLD_GET(RNG_ISR, EHR_VALID, isr);
dev_dbg(dev, "Got RNG_ISR=0x%08X (EHR_VALID=%u)\n", isr, ehr_valid);
-#ifdef CONFIG_CRYPTO_FIPS
- if (CC_REG_FLD_GET(RNG_ISR, CRNGT_ERR, isr) && fips_enabled) {
+ if (fips_enabled && CC_REG_FLD_GET(RNG_ISR, CRNGT_ERR, isr)) {
fips_fail_notify();
/* FIPS error is fatal */
panic("Got HW CRNGT error while fips is enabled!\n");
}
-#endif
/* Clear all pending RNG interrupts */
cc_iowrite(drvdata, CC_RNG_ICR_REG_OFFSET, isr);