diff mbox

ath9k: return false when reading wrong eeprom offset

Message ID 5762DAC7.8090904@riverbed.com (mailing list archive)
State Accepted
Commit 0f27ac40fb64dc0ac8254913b414dde3386196f4
Delegated to: Kalle Valo
Headers show

Commit Message

Eduardo Abinader June 16, 2016, 4:58 p.m. UTC
Just setting the proper return for reading beyond the eeprom data.

Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>
---
 drivers/net/wireless/ath/ath9k/pci.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Julian Calaby June 23, 2016, 1:39 a.m. UTC | #1
Hi All,

On Fri, Jun 17, 2016 at 2:58 AM, Eduardo Abinader
<eduardo.abinader@riverbed.com> wrote:
> Just setting the proper return for reading beyond the eeprom data.
>
> Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>

This makes sense to me.

Reviewed-by: Julian Calaby <julian.calaby@gmail.com>

Thanks,
Kalle Valo June 30, 2016, 11:12 a.m. UTC | #2
Eduardo Abinader <eduardo.abinader@riverbed.com> wrote:
> Just setting the proper return for reading beyond the eeprom data.
> 
> Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>
> Reviewed-by: Julian Calaby <julian.calaby@gmail.com>

Thanks, 1 patch applied to ath-next branch of ath.git:

0f27ac40fb64 ath9k: return false when reading wrong eeprom offset
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 7cdaf40..aa04b13 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/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];