* [PATCH 2.6 2/8] infiniband/hw/nes/nes_verbs.c: fix off-by-one
@ 2008-02-21 14:01 gstreiff
0 siblings, 0 replies; only message in thread
From: gstreiff @ 2008-02-21 14:01 UTC (permalink / raw)
To: rdreier; +Cc: bunk, general, linux-kernel
From: Adrian Bunk <bunk@kernel.org>
This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
---
drivers/infiniband/hw/nes/nes_verbs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 201b95e..692f0d8 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -929,7 +929,7 @@ static struct ib_pd *nes_alloc_pd(struct ib_device *ibdev,
NES_MAX_USER_DB_REGIONS, nesucontext->first_free_db);
nes_debug(NES_DBG_PD, "find_first_zero_biton doorbells returned %u, mapping pd_id %u.\n",
nespd->mmap_db_index, nespd->pd_id);
- if (nespd->mmap_db_index > NES_MAX_USER_DB_REGIONS) {
+ if (nespd->mmap_db_index >= NES_MAX_USER_DB_REGIONS) {
nes_debug(NES_DBG_PD, "mmap_db_index > MAX\n");
nes_free_resource(nesadapter, nesadapter->allocated_pds, pd_num);
kfree(nespd);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-21 13:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-21 14:01 [PATCH 2.6 2/8] infiniband/hw/nes/nes_verbs.c: fix off-by-one gstreiff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®