* [PATCH] dmaengine: amlogic: fix workqueque not free when probe failed
@ 2026-10-23 8:50 Xianwei Zhao via B4 Relay
2026-10-25 7:05 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2026-10-23 8:50 UTC (permalink / raw)
To: Vinod Koul, Frank Li; +Cc: linux-amlogic, dmaengine, linux-kernel, Xianwei Zhao
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
when probe failed, workqueue not free. Convert the driver to use
devm_alloc_ordered_workqueue() for allocating the workqueue. This
ties the workqueue lifetime to the device and removes the need for
explicitly destroying it in the remove callback.
Fixes: b84b5197e344 ("dmaengine: amlogic: Add general DMA driver for A9")
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
Fix workqueque not free when probe failed.
---
drivers/dma/amlogic-dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/amlogic-dma.c b/drivers/dma/amlogic-dma.c
index 684121d13fca..791bd82743d3 100644
--- a/drivers/dma/amlogic-dma.c
+++ b/drivers/dma/amlogic-dma.c
@@ -620,7 +620,7 @@ static int aml_dma_probe(struct platform_device *pdev)
if (!aml_dma)
return -ENOMEM;
- aml_dma->free_wq = alloc_ordered_workqueue("aml_dma_free", 0);
+ aml_dma->free_wq = devm_alloc_ordered_workqueue(&pdev->dev, "aml_dma_free", 0);
if (!aml_dma->free_wq)
return -ENOMEM;
@@ -712,7 +712,6 @@ static void aml_dma_remove(struct platform_device *pdev)
if (aml_chan)
tasklet_kill(&aml_chan->vchan.task);
}
- destroy_workqueue(aml_dma->free_wq);
}
static const struct of_device_id aml_dma_ids[] = {
---
base-commit: aff5e6a77fc69a7c490246465940d18422d7c631
change-id: 20261023-fix-a9-dma-wq-71fef50dff9b
Best regards,
--
Xianwei Zhao <xianwei.zhao@amlogic.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: amlogic: fix workqueque not free when probe failed
2026-10-23 8:50 [PATCH] dmaengine: amlogic: fix workqueque not free when probe failed Xianwei Zhao via B4 Relay
@ 2026-10-25 7:05 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2026-10-25 7:05 UTC (permalink / raw)
To: Xianwei Zhao, dmaengine, linux-amlogic, Frank Li, Vinod Koul
Cc: LKML, Christophe Jaillet
> when probe failed, workqueue not free. Convert the driver to use
…
I find this wording approach improvable.
See also:
[PATCH v2] dmaengine: amlogic: Fix missing destroy_workqueue() at error path in aml_dma_probe()
https://lore.kernel.org/dmaengine/13a835b1770e360af7991bb4c91ce52a8d01e331.1792785154.git.christophe.jaillet@wanadoo.fr/
Regards,
Markus
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-25 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 8:50 [PATCH] dmaengine: amlogic: fix workqueque not free when probe failed Xianwei Zhao via B4 Relay
2026-10-25 7:05 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®