Skip to content

Commit

Permalink
hwrng: cctrng - Remove unnecessary FIPS ifdef
Browse files Browse the repository at this point in the history
This patch removes the unnecessary FIPS ifdef in cctrng.

Signed-off-by: Herbert Xu <[email protected]>
Acked-by: Hadar Gat <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Apr 30, 2020
1 parent 9c3d649 commit b2d7e8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/char/hw_random/cctrng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b2d7e8b

Please sign in to comment.