diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-12-15 16:55:50 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-12-15 16:55:50 -0500 |
commit | 6c7d2a75b512c64c910b69adf32dbaddb461910b (patch) | |
tree | a633a543f384de9b6364e17db687f0c75990470b /drivers/infiniband/hw | |
parent | 44b5b0303327cfb23f135b95b2fe5436c81ed27c (diff) |
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')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_memfree.c | 2 |
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) | |||
233 | for (i = 0; i < chunk->npages; ++i) { | 233 | for (i = 0; i < chunk->npages; ++i) { |
234 | if (chunk->mem[i].length >= offset) { | 234 | if (chunk->mem[i].length >= offset) { |
235 | page = chunk->mem[i].page; | 235 | page = chunk->mem[i].page; |
236 | break; | 236 | goto out; |
237 | } | 237 | } |
238 | offset -= chunk->mem[i].length; | 238 | offset -= chunk->mem[i].length; |
239 | } | 239 | } |