diff options
| author | 2012-10-19 14:07:55 -0700 | |
|---|---|---|
| committer | 2012-10-19 14:07:55 -0700 | |
| commit | 4a1f2b0fba89cdb3b2b1be99a7411bfd24d61be5 (patch) | |
| tree | e14158bdaf2a4723f98fc2411fb65416edb9f90b /lib/dma-debug.c | |
| parent | remap_file_pages: correctly handle the case of a NULL vm_ops pointer (diff) | |
| parent | lib/dma-debug.c: fix __hash_bucket_find() (diff) | |
| download | wireguard-linux-4a1f2b0fba89cdb3b2b1be99a7411bfd24d61be5.tar.xz wireguard-linux-4a1f2b0fba89cdb3b2b1be99a7411bfd24d61be5.zip | |
Merge branch 'akpm' (Fixes from Andrew)
Merge misc fixes from Andrew Morton:
"Seven fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (7 patches)
lib/dma-debug.c: fix __hash_bucket_find()
mm: compaction: correct the nr_strict va isolated check for CMA
firmware/memmap: avoid type conflicts with the generic memmap_init()
pidns: remove recursion from free_pid_ns()
drivers/video/backlight/lm3639_bl.c: return proper error in lm3639_bled_mode_store() error paths
kernel/sys.c: fix stack memory content leak via UNAME26
linux/coredump.h needs asm/siginfo.h
Diffstat (limited to '')
| -rw-r--r-- | lib/dma-debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index b9087bff008b..d84beb994f36 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; |
