Skip to content

Commit

Permalink
crypto: sun4i_ss_prng - fix return value of sun4i_ss_prng_generate
Browse files Browse the repository at this point in the history
According to crypto/rng.h generate function should return 0 on success
and < 0 on error.

Fixes: b8ae5c7 ("crypto: sun4i-ss - support the Security System PRNG")
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Artem Savkov authored and Herbert Xu committed Feb 8, 2018
1 parent 225ece3 commit dd78c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/sunxi-ss/sun4i-ss-prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ int sun4i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src,

writel(0, ss->base + SS_CTL);
spin_unlock(&ss->slock);
return dlen;
return 0;
}

0 comments on commit dd78c83

Please sign in to comment.