diff options
author | Dan Carpenter <error27@gmail.com> | 2011-08-24 01:30:28 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-26 12:55:18 -0400 |
commit | 18cf1248eca3f1fc38e12b314a6cadd286260e65 (patch) | |
tree | 9e58836297302493e72a36f7432487c2709cc81e /drivers/net/ethernet/brocade | |
parent | 44861f4455a77beaec2e53459c77b7fb0eda91a7 (diff) |
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.c | 2 |
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 ed521878278..dd36427f475 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); |