* [PATCH] EDAC: altera: Delete dma_free_coherent()
@ 2025-07-23 23:03 Salah Triki
2025-07-27 17:10 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Salah Triki @ 2025-07-23 23:03 UTC (permalink / raw)
To: Dinh Nguyen, Borislav Petkov, Tony Luck, James Morse,
Mauro Carvalho Chehab, Robert Richter, linux-edac, linux-kernel
Cc: salah.triki
dma_free_coherent() need to be called only when dma_alloc_coherent()
succeed.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
drivers/edac/altera_edac.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index cae52c654a15..7685a8550d4b 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] EDAC: altera: Delete dma_free_coherent()
2025-07-23 23:03 [PATCH] EDAC: altera: Delete dma_free_coherent() Salah Triki
@ 2025-07-27 17:10 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2025-07-27 17:10 UTC (permalink / raw)
To: Salah Triki, linux-edac
Cc: LKML, Borislav Petkov, Dinh Nguyen, James Morse,
Mauro Carvalho Chehab, Robert Richter, Tony Luck
> dma_free_coherent() need to be called only when dma_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
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16-rc7#n94
Would the summary phrase “Delete an inappropriate dma_free_coherent() call
in altr_sdr_mc_err_inject_write()” be more appropriate?
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-27 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-23 23:03 [PATCH] EDAC: altera: Delete dma_free_coherent() Salah Triki
2025-07-27 17:10 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).