2016-06-16 16:58:56

by Eduardo Abinader

[permalink] [raw]
Subject: [PATCH] ath9k: return false when reading wrong eeprom offset

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

Signed-off-by: Eduardo Abinader <[email protected]>
---
drivers/net/wireless/ath/ath9k/pci.c | 2 ++
1 file changed, 2 insertions(+)

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


2016-06-23 01:40:02

by Julian Calaby

[permalink] [raw]
Subject: Re: [PATCH] ath9k: return false when reading wrong eeprom offset

Hi All,

On Fri, Jun 17, 2016 at 2:58 AM, Eduardo Abinader
<[email protected]> wrote:
> Just setting the proper return for reading beyond the eeprom data.
>
> Signed-off-by: Eduardo Abinader <[email protected]>

This makes sense to me.

Reviewed-by: Julian Calaby <[email protected]>

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/

2016-06-30 11:12:54

by Kalle Valo

[permalink] [raw]
Subject: Re: ath9k: return false when reading wrong eeprom offset

Eduardo Abinader <[email protected]> wrote:
> Just setting the proper return for reading beyond the eeprom data.
>
> Signed-off-by: Eduardo Abinader <[email protected]>
> Reviewed-by: Julian Calaby <[email protected]>

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

0f27ac40fb64 ath9k: return false when reading wrong eeprom offset

--
Sent by pwcli
https://patchwork.kernel.org/patch/9181371/