public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: Should error status be negative?
@ 2009-11-11 22:07 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-11-11 22:07 UTC (permalink / raw)
  To: Andrew Morton, LKML, David Brownell, spi-devel-general

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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-11 21:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 22:07 [PATCH] spi: Should error status be negative? Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox