[PATCH] rewrite the return method of static int s3c24xx_spi_setup(struct spi_device *spi) in drivers/spi/spi_s3c24xx.c
From: Zhwen Xu
Date: Tue Dec 09 2008 - 21:38:36 EST
Signed-off-by: ZhenwenXu <helight.xu@xxxxxxxxx>
---
drivers/spi/spi_s3c24xx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 3eb414b..0489254 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -165,14 +165,14 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
ret = s3c24xx_spi_setupxfer(spi, NULL);
if (ret < 0) {
dev_err(&spi->dev, "setupxfer returned %d\n", ret);
- return ret;
+ goto err;
}
dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
__func__, spi->mode, spi->bits_per_word,
spi->max_speed_hz);
-
- return 0;
+err:
+ return ret;
}
static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count)
--
1.5.6.5
--VS++wcV0S1rZb1Fb--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/