crypto: sahara - Fix error check for dma_map_sg

dma_map_sg return 0 on error, it returns the number of
DMA address segments mapped (this may be shorter
than <nents> passed in if some elements of the scatter/gather
list are physically or virtually adjacent and an IOMMU maps
them with a single entry).

Cc: Herbert Xu <>
Cc: "David S. Miller" <>

Signed-off-by: Jack Wang <>
Signed-off-by: Herbert Xu <>
1 file changed