* [U-Boot] [PATCH] drivers/mtd/spi/eeprom_m95xxx.c: add missing error checking
@ 2010-03-14 17:47 Albin Tonnerre
2010-04-09 21:06 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Albin Tonnerre @ 2010-03-14 17:47 UTC (permalink / raw)
To: u-boot
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
---
drivers/mtd/spi/eeprom_m95xxx.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/eeprom_m95xxx.c b/drivers/mtd/spi/eeprom_m95xxx.c
index 0148d00..632db4e 100644
--- a/drivers/mtd/spi/eeprom_m95xxx.c
+++ b/drivers/mtd/spi/eeprom_m95xxx.c
@@ -44,6 +44,9 @@ ssize_t spi_read (uchar *addr, int alen, uchar *buffer, int len)
slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 1000000,
CONFIG_DEFAULT_SPI_MODE);
+ if(!slave)
+ return 0;
+
spi_claim_bus(slave);
/* command */
@@ -75,6 +78,9 @@ ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len)
slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 1000000,
CONFIG_DEFAULT_SPI_MODE);
+ if (!slave)
+ return 0;
+
spi_claim_bus(slave);
buf[0] = SPI_EEPROM_WREN;
--
1.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] drivers/mtd/spi/eeprom_m95xxx.c: add missing error checking
2010-03-14 17:47 [U-Boot] [PATCH] drivers/mtd/spi/eeprom_m95xxx.c: add missing error checking Albin Tonnerre
@ 2010-04-09 21:06 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2010-04-09 21:06 UTC (permalink / raw)
To: u-boot
Dear Albin Tonnerre,
In message <1268588843-23451-1-git-send-email-albin.tonnerre@free-electrons.com> you wrote:
> Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
> ---
> drivers/mtd/spi/eeprom_m95xxx.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lispers are among the best grads of the Sweep-It-Under-Someone-
Else's-Carpet School of Simulated Simplicity. [Was that sufficiently
incendiary? :-)] - Larry Wall in <1992Jan10.201804.11926@netlabs.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-09 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-14 17:47 [U-Boot] [PATCH] drivers/mtd/spi/eeprom_m95xxx.c: add missing error checking Albin Tonnerre
2010-04-09 21:06 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.