spi: error status should be negative
Return a negative error value instead of a positive Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: dmitry pervushin <dpervushin@embeddedalley.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
23f268fa2d
commit
b6b24c73d5
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue