Searched hist:bc13c69e29697f90200cf77d133a39ca1e525590 (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/crypto/caam/ |
H A D | caamhash.c | diff bc13c69e29697f90200cf77d133a39ca1e525590 Mon Aug 08 19:05:03 CEST 2016 Russell King <rmk+kernel@arm.linux.org.uk> crypto: caam - check and use dma_map_sg() return code
Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can fail, and we completely fail to check its return value. So, fix this properly.
Arrange the code to map the scatterlist early, so we know how many scatter table entries to allocate, and then fill them in. This allows us to keep relatively simple error cleanup paths.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|