crypto: sun8i-ss - do not fallback if cryptlen is less than sg length
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 2 May 2022 20:19:25 +0000 (20:19 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 May 2022 09:24:20 +0000 (17:24 +0800)
commit2e5545acf6584c196b4f4e1c1eea017a48699926
tree82906f123800addbea19f0a117f54015894a7859
parent801b7d572c0ad46b116730121e9d3beefb0c7004
crypto: sun8i-ss - do not fallback if cryptlen is less than sg length

The sg length could be more than remaining data on it.
So check the length requirement against the minimum between those two
values.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c