projects/linux·commit c6ca97d2

[PATCH] SPI: at25: do not use pointer before assignment

c6ca97d2 · Atsushi Nemoto <[email protected]> · 2007-03-16 13:38:20 -08:00

Prevents a potential oops with CONFIG_SPI_DEBUG given flakey hardware or
incorrect configuration.

Signed-off-by: Atsushi Nemoto <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
c6ca97d26a7efe9488174336bc67fdaea01aad49
Parents
13788ccc

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/spi/at25.cmodified+1−1View file

drivers/spi/at25.c

View file
diff --git a/drivers/spi/at25.c b/drivers/spi/at25.c
index 48e4f48..8efa07e 100644
--- a/drivers/spi/at25.c
+++ b/drivers/spi/at25.c
@@ -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;
}