Skip to content

Commit

Permalink
tle62x0 driver stops ignoring read errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Nov 15, 2007
1 parent 8744969 commit 822bd5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/spi/tle62x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 822bd5a

Please sign in to comment.