crypto: octeontx2 - prevent underflow in get_cores_bmap()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 17 Dec 2021 07:13:32 +0000 (10:13 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Dec 2021 03:18:27 +0000 (14:18 +1100)
commit10371b6212bb682f13247733d6b76b91b2b80f9a
tree4418719c4f8c4c712c357519070c4a99e168d98f
parent3438e7220b3183b1ee80227e3a0d742b18df4623
crypto: octeontx2 - prevent underflow in get_cores_bmap()

If we're going to cap "eng_grp->g->engs_num" upper bounds then we should
cap the lower bounds as well.

Fixes: 43ac0b824f1c ("crypto: octeontx2 - load microcode and create engine groups")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c