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 <[email protected]>
Acked-by: Hauke Mehrtens <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Daniel Golle
2021-11-28 22:20:34 +01:00
committed by Felix Fietkau
parent 094b3d8008
commit 25237b19bc
+1 -1
View File
@@ -65,7 +65,7 @@ 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 (ret) {
if (ret && !mtd_is_bitflip(ret)) {
dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
part, ret);
goto out_put_node;