From: Dan Carpenter Date: Sun, 19 Sep 2010 18:25:54 +0000 (-0700) Subject: bna: off by one X-Git-Tag: v3.12-rc1~8399^2~402 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0746556beab1a57f1afb5c9d6f393d98528ce682;p=kernel%2Fkernel-generic.git bna: off by one The mod->mbhdlr[] array has BFI_MC_MAX elements. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c index caa45c2..73493de 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);