mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
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);
|
||||
|
||||
if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN))
|
||||
status = ETIMEDOUT;
|
||||
status = -ETIMEDOUT;
|
||||
|
||||
if (!dma_buf)
|
||||
dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir);
|
||||
|
Loading…
Reference in New Issue
Block a user