fpga: dfl: afu: Pass the correct device to dma_mapping_error()
[ Upstream commit 13069847a4 ]
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>
This commit is contained in:
parent
7b2145e222
commit
505de32ea9
1 changed files with 1 additions and 1 deletions
|
|
@ -399,7 +399,7 @@ int afu_dma_map_region(struct dfl_feature_platform_data *pdata,
|
|||
region->pages[0], 0,
|
||||
region->length,
|
||||
DMA_BIDIRECTIONAL);
|
||||
if (dma_mapping_error(&pdata->dev->dev, region->iova)) {
|
||||
if (dma_mapping_error(dfl_fpga_pdata_to_parent(pdata), region->iova)) {
|
||||
dev_err(&pdata->dev->dev, "failed to map for dma\n");
|
||||
ret = -EFAULT;
|
||||
goto unpin_pages;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue