ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Abinader <eduardo.abinader@riverbed.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath9k: return false when reading wrong eeprom offset
Date: Thu, 16 Jun 2016 18:58:47 +0200	[thread overview]
Message-ID: <5762DAC7.8090904@riverbed.com> (raw)

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

             reply	other threads:[~2016-06-16 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 16:58 Eduardo Abinader [this message]
2016-06-23  1:39 ` [ath9k-devel] [PATCH] ath9k: return false when reading wrong eeprom offset 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5762DAC7.8090904@riverbed.com \
    --to=eduardo.abinader@riverbed.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).