summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-08-24 01:30:28 +0000
committerDavid S. Miller <davem@davemloft.net>2011-08-26 12:55:18 -0400
commit18cf1248eca3f1fc38e12b314a6cadd286260e65 (patch)
tree9e58836297302493e72a36f7432487c2709cc81e /drivers/net/ethernet/brocade
parent44861f4455a77beaec2e53459c77b7fb0eda91a7 (diff)
downloadblackbird-op-linux-18cf1248eca3f1fc38e12b314a6cadd286260e65.tar.gz
blackbird-op-linux-18cf1248eca3f1fc38e12b314a6cadd286260e65.zip
bna: off by one in bfa_msgq_rspq_pi_update()
The rspq->rsphdlr[] array has BFI_MC_MAX elements, so this test was off by one. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_msgq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfa_msgq.c b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
index ed5218782787..dd36427f4752 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_msgq.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
@@ -483,7 +483,7 @@ bfa_msgq_rspq_pi_update(struct bfa_msgq_rspq *rspq, struct bfi_mbmsg *mb)
mc = msghdr->msg_class;
num_entries = ntohs(msghdr->num_entries);
- if ((mc > BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
+ if ((mc >= BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
break;
(rspq->rsphdlr[mc].cbfn)(rspq->rsphdlr[mc].cbarg, msghdr);
OpenPOWER on IntegriCloud