]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Tue, 25 Jun 2019 03:35:55 +0000 (11:35 +0800)
commit505de32ea95209c2b587bb91b87e460bc59221ff
tree6c794e786ce429e1b57be7bd0c3d91f9b343cd68
parent7b2145e2224719d4d706b4789a35fb7bd53c9707
fpga: dfl: afu: Pass the correct device to dma_mapping_error()

[ Upstream commit 13069847a475b60069918dc9971f5adb42811ce3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/fpga/dfl-afu-dma-region.c