ar71xx: clean up spi controller related patches
[openwrt/openwrt.git] / target / linux / ar71xx / patches-4.4 / 460-m25p80-spi-read-flash-check.patch
1 --- a/drivers/mtd/devices/m25p80.c
2 +++ b/drivers/mtd/devices/m25p80.c
3 @@ -149,8 +149,10 @@ static int m25p80_read(struct spi_nor *n
4 msg.data_nbits = m25p80_rx_nbits(nor);
5
6 ret = spi_flash_read(spi, &msg);
7 - *retlen = msg.retlen;
8 - return ret;
9 + if (!ret) {
10 + *retlen = msg.retlen;
11 + return 0;
12 + }
13 }
14
15 spi_message_init(&m);