aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_memfree.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2005-12-15 13:55:50 -0800
committerRoland Dreier <rolandd@cisco.com>2005-12-15 13:55:50 -0800
commit6c7d2a75b512c64c910b69adf32dbaddb461910b (patch)
treea633a543f384de9b6364e17db687f0c75990470b /drivers/infiniband/hw/mthca/mthca_memfree.c
parentIB/mthca: don't change driver's copy of attributes if modify QP fails (diff)
downloadlinux-dev-6c7d2a75b512c64c910b69adf32dbaddb461910b.tar.xz
linux-dev-6c7d2a75b512c64c910b69adf32dbaddb461910b.zip
IB/mthca: Fix thinko in mthca_table_find()
break only escapes from the innermost loop, and we want to escape both loops and return an answer. Noticed by Ishai Rabinovitch. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_memfree.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_memfree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c
index 5798ed00d83d..9fb985a016e9 100644
--- a/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -233,7 +233,7 @@ void *mthca_table_find(struct mthca_icm_table *table, int obj)
for (i = 0; i < chunk->npages; ++i) {
if (chunk->mem[i].length >= offset) {
page = chunk->mem[i].page;
- break;
+ goto out;
}
offset -= chunk->mem[i].length;
}