diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-03-16 17:38:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-16 22:25:05 -0400 |
commit | c6ca97d26a7efe9488174336bc67fdaea01aad49 (patch) | |
tree | 1d7febebda821527e7463a24ff49a1a1f7c97440 | |
parent | 13788ccc41ceea5893f9c747c59bc0b28f2416c2 (diff) |
[PATCH] SPI: at25: do not use pointer before assignment
Prevents a potential oops with CONFIG_SPI_DEBUG given flakey hardware or
incorrect configuration.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
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>
-rw-r--r-- | drivers/spi/at25.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/at25.c b/drivers/spi/at25.c index 48e4f48e779f..8efa07e8b8c2 100644 --- a/drivers/spi/at25.c +++ b/drivers/spi/at25.c | |||
@@ -291,7 +291,7 @@ static int at25_probe(struct spi_device *spi) | |||
291 | */ | 291 | */ |
292 | sr = spi_w8r8(spi, AT25_RDSR); | 292 | sr = spi_w8r8(spi, AT25_RDSR); |
293 | if (sr < 0 || sr & AT25_SR_nRDY) { | 293 | if (sr < 0 || sr & AT25_SR_nRDY) { |
294 | dev_dbg(&at25->spi->dev, "rdsr --> %d (%02x)\n", sr, sr); | 294 | dev_dbg(&spi->dev, "rdsr --> %d (%02x)\n", sr, sr); |
295 | err = -ENXIO; | 295 | err = -ENXIO; |
296 | goto fail; | 296 | goto fail; |
297 | } | 297 | } |