Commit b6b24c73 authored by Roel Kluin's avatar Roel Kluin Committed by Linus Torvalds

spi: error status should be negative

Return a negative error value instead of a positive
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: dmitry pervushin <dpervushin@embeddedalley.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 23f268fa
...@@ -242,7 +242,7 @@ static int stmp_spi_txrx_dma(struct stmp_spi *ss, int cs, ...@@ -242,7 +242,7 @@ static int stmp_spi_txrx_dma(struct stmp_spi *ss, int cs,
wait_for_completion(&ss->done); wait_for_completion(&ss->done);
if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN)) if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN))
status = ETIMEDOUT; status = -ETIMEDOUT;
if (!dma_buf) if (!dma_buf)
dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir); dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment