mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: eeprom: fix return code on corrected bit-flips
Ensure that the return code is 0 when data was read successfully Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -65,7 +65,9 @@ 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 && !mtd_is_bitflip(ret)) {
|
||||
if (mtd_is_bitflip(ret))
|
||||
ret = 0;
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
|
||||
part, ret);
|
||||
goto out_put_node;
|
||||
|
||||
Reference in New Issue
Block a user