[openib-general] [PATCH] mthca thinko
Michael S. Tsirkin
mst at mellanox.co.il
Thu Dec 15 08:44:02 PST 2005
Fix thinko in mthca_table_find: break only escapes from the innermost loop.
Ishai Rabinovitch
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: openib/drivers/infiniband/hw/mthca/mthca_memfree.c
===================================================================
--- openib/drivers/infiniband/hw/mthca/mthca_memfree.c (revision 4369)
+++ openib/drivers/infiniband/hw/mthca/mthca_memfree.c (working copy)
@@ -232,9 +232,9 @@ void *mthca_table_find(struct mthca_icm_
list_for_each_entry(chunk, &icm->chunk_list, list) {
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;
}
}
--
MST
More information about the general
mailing list