diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index c9dbc8f5812b..9e1a724ae7e7 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c @@ -62,8 +62,8 @@ void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, { struct dma_devres match_data = { size, vaddr, dma_handle }; - dma_free_coherent(dev, size, vaddr, dma_handle); WARN_ON(devres_destroy(dev, dmam_release, dmam_match, &match_data)); + dma_free_coherent(dev, size, vaddr, dma_handle); } EXPORT_SYMBOL(dmam_free_coherent);