ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH] ath9k: return false when reading wrong eeprom offset
@ 2016-06-16 16:58 Eduardo Abinader
  2016-06-23  1:39 ` Julian Calaby
  2016-06-30 11:12 ` [ath9k-devel] " Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Eduardo Abinader @ 2016-06-16 16:58 UTC (permalink / raw)
  To: ath9k-devel

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(+)

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [ath9k-devel] [PATCH] ath9k: return false when reading wrong eeprom offset
@ 2016-06-15 14:51 Eduardo Abinader
  2016-06-16 16:06 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Eduardo Abinader @ 2016-06-15 14:51 UTC (permalink / raw)
  To: ath9k-devel

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(+)

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-30 11:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 16:58 [ath9k-devel] [PATCH] ath9k: return false when reading wrong eeprom offset Eduardo Abinader
2016-06-23  1:39 ` Julian Calaby
2016-06-30 11:12 ` [ath9k-devel] " Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2016-06-15 14:51 [ath9k-devel] [PATCH] " Eduardo Abinader
2016-06-16 16:06 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).