From 66bef800c9508a51df45da88cba45cc7ded8bc9d Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Fri, 19 Oct 2012 13:57:01 -0700 Subject: [PATCH] --- yaml --- r: 334599 b: refs/heads/master c: fe73fbe1c5eda709084dedb66cbdd4b86826cce7 h: refs/heads/master i: 334597: 2988ce052e6949489b9baa1fbd1662a7a9d1e827 334595: f28a2854c97e3b29dbdbc120eb2a907ec9fef9cf 334591: 83ecf23a3ab3748b8cfb74f996a7e83c0bac5e07 v: v3 --- [refs] | 2 +- trunk/lib/dma-debug.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9964f2beaa96..91cdcd7b2718 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0db63d7e25f96e2c6da925c002badf6f144ddf30 +refs/heads/master: fe73fbe1c5eda709084dedb66cbdd4b86826cce7 diff --git a/trunk/lib/dma-debug.c b/trunk/lib/dma-debug.c index b9087bff008b..d84beb994f36 100644 --- a/trunk/lib/dma-debug.c +++ b/trunk/lib/dma-debug.c @@ -264,7 +264,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, match_fn match) { struct dma_debug_entry *entry, *ret = NULL; - int matches = 0, match_lvl, last_lvl = 0; + int matches = 0, match_lvl, last_lvl = -1; list_for_each_entry(entry, &bucket->list, list) { if (!match(ref, entry)) @@ -293,7 +293,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, } else if (match_lvl > last_lvl) { /* * We found an entry that fits better then the - * previous one + * previous one or it is the 1st match. */ last_lvl = match_lvl; ret = entry;