summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-09-19 11:25:54 -0700
committerDavid S. Miller <davem@davemloft.net>2010-09-19 11:25:54 -0700
commit0746556beab1a57f1afb5c9d6f393d98528ce682 (patch)
tree52b43035cfdf911f5105c6b04e0946954be0cc14
parent8f8f103d8466e627ecef7894248eb79407d9047c (diff)
bna: off by one
The mod->mbhdlr[] array has BFI_MC_MAX elements. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bna/bfa_ioc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c
index caa45c2185e..73493de98de 100644
--- a/drivers/net/bna/bfa_ioc.c
+++ b/drivers/net/bna/bfa_ioc.c
@@ -1514,7 +1514,7 @@ bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc)
return;
}
- if ((mc > BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
+ if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
return;
mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);