Skip to contentSkip to conversation

spi: Should error status be negative?

PATCH New Roel Kluin 1 participant 1 message Nov 11, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 spi: Should error status be negative?

Return a negative error value instead of a positive

---
 drivers/spi/spi_stmp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

is this maybe required?

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