lkml.org 
[lkml]   [2009]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] spi: Should error status be negative?
Return a negative error value instead of a positive

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
drivers/spi/spi_stmp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

is this maybe required?

diff --git a/drivers/spi/spi_stmp.c b/drivers/spi/spi_stmp.c
index d871dc2..2552bb3 100644
--- a/drivers/spi/spi_stmp.c
+++ b/drivers/spi/spi_stmp.c
@@ -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);

\
 
 \ /
  Last update: 2009-11-11 22:59    [W:3.521 / U:1.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site