summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-05-02 17:49:52 -0700
committerEric Anholt <eric@anholt.net>2008-05-02 17:49:52 -0700
commitafe574f328fca42f2fa5fbc1c7a1c13d0f35d2f6 (patch)
treeaf8770dfc5ce86f0b42cb2778697177273bf10b4
parent5f0614b86ff5760016bef87c6f6012fe4f42e14e (diff)
Don't include the tail guard memrange in foreach callbacking.
-rw-r--r--linux-core/drm_memrange.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-core/drm_memrange.c b/linux-core/drm_memrange.c
index 663943ab..7304cbaa 100644
--- a/linux-core/drm_memrange.c
+++ b/linux-core/drm_memrange.c
@@ -291,10 +291,11 @@ int drm_memrange_for_each(struct drm_memrange *mm,
int ret;
cur = list_entry(list, struct drm_memrange_node, ml_entry);
-
- ret = callback(cur, data);
- if (ret != 0)
- return ret;
+ if (!cur->free) {
+ ret = callback(cur, data);
+ if (ret != 0)
+ return ret;
+ }
}
return 0;