fpga: dfl: afu: Pass the correct device to dma_mapping_error()
authorScott Wood <swood@redhat.com>
Thu, 9 May 2019 21:08:27 +0000 (16:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 18:32:12 +0000 (20:32 +0200)
commit13069847a475b60069918dc9971f5adb42811ce3
tree94ba9ceda4e4f9c0f6998ce93257a526a1a5c21a
parentf5dd87326fefe42a4b1a4b1a1a695060c33a88d6
fpga: dfl: afu: Pass the correct device to dma_mapping_error()

dma_mapping_error() was being called on a different device struct than
what was passed to map/unmap.  Besides rendering the error checking
ineffective, it caused a debug splat with CONFIG_DMA_API_DEBUG.

Signed-off-by: Scott Wood <swood@redhat.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Acked-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl-afu-dma-region.c