You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
342 B
16 lines
342 B
8 years ago
|
--- a/drivers/mtd/devices/m25p80.c
|
||
|
+++ b/drivers/mtd/devices/m25p80.c
|
||
|
@@ -149,8 +149,10 @@ static int m25p80_read(struct spi_nor *n
|
||
|
msg.data_nbits = m25p80_rx_nbits(nor);
|
||
|
|
||
|
ret = spi_flash_read(spi, &msg);
|
||
|
- *retlen = msg.retlen;
|
||
|
- return ret;
|
||
|
+ if (!ret) {
|
||
|
+ *retlen = msg.retlen;
|
||
|
+ return 0;
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
spi_message_init(&m);
|