Commit 11d23b99 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Neena Busireddy
Browse files

spi: core: Fix check for dma_map_sg() failures



According to Documentation/DMA-API.txt, dma_map_sg() returns 0 on failure.
As spi_map_buf() returns an error code, convert zero into -ENOMEM.
Keep the existing check for negative numbers just in case.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
(cherry picked from commit 89e4b66a)
(cherry picked from commit d176f970196ecc2c0f0c30116061fdeba3461556)
parent 07f5793e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment