X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=lib%2Fdma-debug.c;h=d84beb994f36f1c0b6d7e82fa02fc558a13f88c9;hb=2df4f26167ab6adc7d2648f57f433ff461965fc8;hp=b9087bff008be9ef4b4eb2ebb7acea898b69be8d;hpb=940e3a8dd6683a3787faf769b3df7a06f1c2fa31;p=~andy%2Flinux diff --git a/lib/dma-debug.c b/lib/dma-debug.c index b9087bff008..d84beb994f3 100644 --- a/lib/dma-debug.c +++ b/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;