crypto: inside_secure - Avoid dma map if size is zero
authorPeter Harliman Liem <pliem@maxlinear.com>
Tue, 13 Sep 2022 08:03:47 +0000 (16:03 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 24 Sep 2022 08:14:42 +0000 (16:14 +0800)
commit49186a7d9e46ff132a0ed9b721ad6b6a58dba6c1
treeb52b060e162e47a32c507096385def1cd60437b1
parent072d36eefd6fde17928d214df64fdac32f60b4f4
crypto: inside_secure - Avoid dma map if size is zero

From commit d03c54419274 ("dma-mapping: disallow .map_sg
operations from returning zero on error"), dma_map_sg()
produces warning if size is 0. This results in visible
warnings if crypto length is zero.
To avoid that, we avoid calling dma_map_sg if size is zero.

Signed-off-by: Peter Harliman Liem <pliem@maxlinear.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_cipher.c