summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-11-14 17:00:04 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 18:45:42 -0800
commit822bd5aa2b8e8fa1d328f03bf5b9c75701481bf0 (patch)
tree864abe3457ba16ddb3d37656b3c514d1648f87cc /drivers/spi
parent8744969a819de4ee5158f4cdb30104601cc015d4 (diff)
downloadlinux-822bd5aa2b8e8fa1d328f03bf5b9c75701481bf0.tar.bz2
tle62x0 driver stops ignoring read errors
The tle62x0 driver was ignoring all read errors. This patch makes it pass such errors up the stack, instead of returning bogus data. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/tle62x0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/tle62x0.c b/drivers/spi/tle62x0.c
index 6da58ca48b33..455991fbe28f 100644
--- a/drivers/spi/tle62x0.c
+++ b/drivers/spi/tle62x0.c
@@ -107,8 +107,11 @@ static ssize_t tle62x0_status_show(struct device *dev,
mutex_lock(&st->lock);
ret = tle62x0_read(st);
-
dev_dbg(dev, "tle62x0_read() returned %d\n", ret);
+ if (ret < 0) {
+ mutex_unlock(&st->lock);
+ return ret;
+ }
for (ptr = 0; ptr < (st->nr_gpio * 2)/8; ptr += 1) {
fault <<= 8;