EDAC: altera: Delete dma_free_coherent()
Subsystems (2)
PATCH 1/1 EDAC: altera: Delete dma_free_coherent()
dma_free_coherent() need to be called only when dma_alloc_coherent() succeed.
Signed-off-by Salah Triki <[email protected]>
--- drivers/edac/altera_edac.c | 1 - 1 file changed, 1 deletion(-)
drivers/edac/altera_edac.c +0 -1
@@ -128,7 +128,6 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file, ptemp =dma_alloc_coherent (mci->pdev,16 , &dma_handle,GFP_KERNEL );if (!ptemp) { -dma_free_coherent (mci->pdev,16 , ptemp, dma_handle);edac_printk (KERN_ERR ,EDAC_MC ,"Inject: Buffer Allocation error\n" );return -ENOMEM ;
Signature · 1 line
2.43.0
Quoted 2 lines
dma_free_coherent()need to be called only whendma_alloc_coherent()succeed.
succeeded?
How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16-rc7#n145
Would the summary phrase “Delete an inappropriate dma_free_coherent() call in altr_sdr_mc_err_inject_write()” be more appropriate?
Regards,
Markus