projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44b5b03
)
IB/mthca: Fix thinko in mthca_table_find()
author
Michael S. Tsirkin
<mst@mellanox.co.il>
Thu, 15 Dec 2005 21:55:50 +0000
(13:55 -0800)
committer
Roland Dreier
<rolandd@cisco.com>
Thu, 15 Dec 2005 21:55:50 +0000
(13:55 -0800)
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>
drivers/infiniband/hw/mthca/mthca_memfree.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mthca/mthca_memfree.c
b/drivers/infiniband/hw/mthca/mthca_memfree.c
index 5798ed00d83d1f0356e1a8c96c5d5b137ce9936f..9fb985a016e902d6ed6f977e18bdb78ee6ce7984 100644
(file)
--- 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;
}