crypto: hisilicon/hpre - add check before gx modulo p
authorHui Tang <tanghui20@huawei.com>
Sat, 29 May 2021 08:58:19 +0000 (16:58 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Jun 2021 12:24:06 +0000 (20:24 +0800)
commit9612581fc10919ef70aae1fa4dcf6e20d85a14a7
tree2c850ed8b42e6406ead51f363493e5d0318e800e
parent1e609f5fb73b6b17af369a031f3a4c2b9b405854
crypto: hisilicon/hpre - add check before gx modulo p

The result of gx modulo p is zero if gx is equal to p, so return
error immediately if gx is equal to p.

Signed-off-by: Hui Tang <tanghui20@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_crypto.c