forked from Minki/linux
mt76: eeprom: tolerate corrected bit-flips
mtd_read() returns -EUCLEAN in case of corrected bit-flips. As data was read, don't error out in this case. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
15965d8c9c
commit
5b595b6639
@ -65,6 +65,8 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
|
||||
offset = be32_to_cpup(list);
|
||||
ret = mtd_read(mtd, offset, len, &retlen, eep);
|
||||
put_mtd_device(mtd);
|
||||
if (mtd_is_bitflip(ret))
|
||||
ret = 0;
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
|
||||
part, ret);
|
||||
|
Loading…
Reference in New Issue
Block a user