summaryrefslogtreecommitdiff
path: root/drivers/rng/msm_rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rng/msm_rng.c')
-rw-r--r--drivers/rng/msm_rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rng/msm_rng.c b/drivers/rng/msm_rng.c
index f790d3b60f9..01505509103 100644
--- a/drivers/rng/msm_rng.c
+++ b/drivers/rng/msm_rng.c
@@ -76,7 +76,7 @@ static int msm_rng_enable(struct msm_rng_priv *priv, int enable)
if (enable) {
/* Enable PRNG only if it is not already enabled */
val = readl_relaxed(priv->base + PRNG_CONFIG);
- if (val & PRNG_CONFIG_HW_ENABLE) {
+ if (!(val & PRNG_CONFIG_HW_ENABLE)) {
val = readl_relaxed(priv->base + PRNG_LFSR_CFG);
val &= ~PRNG_LFSR_CFG_MASK;
val |= PRNG_LFSR_CFG_CLOCKS;