[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>
This commit is contained in:
parent
13788ccc41
commit
c6ca97d26a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue