瀏覽代碼

ath9k: return false when reading wrong eeprom offset

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>
Eduardo Abinader 9 年之前
父節點
當前提交
0f27ac40fb
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/wireless/ath/ath9k/pci.c

+ 2 - 0
drivers/net/wireless/ath/ath9k/pci.c

@@ -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];