Skip to contentSkip to conversation

ath9k: return false when reading wrong eeprom offset

PATCH In review Eduardo Abinader 3 participants 3 messages Jun 16, 2016 – Jun 30, 2016 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: return false when reading wrong eeprom offset

Just setting the proper return for reading beyond the eeprom data.

---
 drivers/net/wireless/ath/ath9k/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath9k/pci.c +2 -0
index 7cdaf40..aa04b13 100644
@@ -794,6 +794,8 @@ static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
 			ath_err(common,
 				"%s: eeprom read failed, offset %08x is out of range\n",
 				__func__, off);
+
+			return false;
 		}
 
 		*data = pdata->eeprom_data[off];
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 ath9k: return false when reading wrong eeprom offset

Hi All,

Quoted 3 lines · Eduardo Abinader

Just setting the proper return for reading beyond the eeprom data.

This makes sense to me.

Thanks,

Signature · 4 lines
Julian Calaby

Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/