Skip to content
Snippets Groups Projects
Commit 3e5daee5 authored by Robin Murphy's avatar Robin Murphy Committed by Vinod Koul
Browse files

dmaengine: mv_xor: Use correct device for DMA API


Using dma_dev->dev for mappings before it's assigned with the correct
device is unlikely to work as expected, and with future dma-direct
changes, passing a NULL device may end up crashing entirely. I don't
know enough about this hardware or the mv_xor_prep_dma_interrupt()
operation to implement the appropriate error-handling logic that would
have revealed those dma_map_single() calls failing on arm64 for as long
as the driver has been enabled there, but moving the assignment earlier
will at least make the current code operate as intended.

Fixes: 22843545 ("dma: mv_xor: Add support for DMA_INTERRUPT")
Reported-by: default avatarJohn David Anglin <dave.anglin@bell.net>
Tested-by: default avatarJohn David Anglin <dave.anglin@bell.net>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 85ed4f43
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment