Skip to content

Commit

Permalink
[PATCH] SPI: at25: do not use pointer before assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atsushi Nemoto authored and Linus Torvalds committed Mar 17, 2007
1 parent 13788cc commit c6ca97d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/at25.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static int at25_probe(struct spi_device *spi)
*/
sr = spi_w8r8(spi, AT25_RDSR);
if (sr < 0 || sr & AT25_SR_nRDY) {
dev_dbg(&at25->spi->dev, "rdsr --> %d (%02x)\n", sr, sr);
dev_dbg(&spi->dev, "rdsr --> %d (%02x)\n", sr, sr);
err = -ENXIO;
goto fail;
}
Expand Down

0 comments on commit c6ca97d

Please sign in to comment.