linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ath10k: off by one sanity check
@ 2013-06-18  7:28 Dan Carpenter
  2013-07-05 13:36 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-06-18  7:28 UTC (permalink / raw)
  To: John W. Linville; +Cc: Kalle Valo, linux-wireless, kernel-janitors

This should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 8e4e832..c8e9056 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1772,7 +1772,7 @@ static irqreturn_t ath10k_pci_per_engine_handler(int irq, void *arg)
 	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
 	int ce_id = irq - ar_pci->pdev->irq - MSI_ASSIGN_CE_INITIAL;
 
-	if (ce_id < 0 || ce_id > ARRAY_SIZE(ar_pci->pipe_info)) {
+	if (ce_id < 0 || ce_id >= ARRAY_SIZE(ar_pci->pipe_info)) {
 		ath10k_warn("unexpected/invalid irq %d ce_id %d\n", irq, ce_id);
 		return IRQ_HANDLED;
 	}

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

* Re: [patch] ath10k: off by one sanity check
  2013-06-18  7:28 [patch] ath10k: off by one sanity check Dan Carpenter
@ 2013-07-05 13:36 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-07-05 13:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: John W. Linville, linux-wireless, kernel-janitors, ath9k-devel

Dan Carpenter <dan.carpenter@oracle.com> writes:

> This should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for the patch. John already applied this to his wireless-next
tree.

-- 
Kalle Valo

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

end of thread, other threads:[~2013-07-05 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  7:28 [patch] ath10k: off by one sanity check Dan Carpenter
2013-07-05 13:36 ` 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).