diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-12-15 13:55:50 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-12-15 13:55:50 -0800 |
commit | 6c7d2a75b512c64c910b69adf32dbaddb461910b (patch) | |
tree | a633a543f384de9b6364e17db687f0c75990470b /drivers | |
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')
-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 5798ed00d83..9fb985a016e 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; } |