lib/dma-debug.c: fix __hash_bucket_find()
authorMing Lei <ming.lei@canonical.com>
Fri, 19 Oct 2012 20:57:01 +0000 (13:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Oct 2012 21:07:48 +0000 (14:07 -0700)
commitfe73fbe1c5eda709084dedb66cbdd4b86826cce7
tree14b8e5919cd00b1c38ddff56eebb00c17c4d2905
parent0db63d7e25f96e2c6da925c002badf6f144ddf30
lib/dma-debug.c: fix __hash_bucket_find()

If there is only one match, the unique matched entry should be returned.

Without the fix, the upcoming dma debug interfaces ("dma-debug: new
interfaces to debug dma mapping errors") can't work reliably because
only device and dma_addr are passed to dma_mapping_error().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Tested-by: Shuah Khan <shuah.khan@hp.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/dma-debug.c