ath9k: return false when reading wrong eeprom offset
authorEduardo Abinader <eduardo.abinader@riverbed.com>
Wed, 29 Jun 2016 16:29:29 +0000 (19:29 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 30 Jun 2016 11:10:12 +0000 (14:10 +0300)
Just setting the proper return for reading beyond the eeprom data.

Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/pci.c

index 7cdaf40c3057d788dbfa01865c75178871655833..aa04b13bc5f281a400f38759ecba6da72f73cd37 100644 (file)
@@ -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];