* [PATCH] dmaengine: ppc4xx: use assigned variable for dma_free_coherent()
@ 2026-09-11 3:59 Rosen Penev
2026-09-11 15:04 ` Frank Li
0 siblings, 1 reply; 3+ messages in thread
From: Rosen Penev @ 2026-09-11 3:59 UTC (permalink / raw)
To: dmaengine
Cc: Vinod Koul, Frank Li, Yuri Tikhonov, Dan Williams,
Anatolij Gustschin, open list
In some goto paths, adev->dev is unassigned. Use &ofdev->dev to cover
those cases.
Fixes: 12458ea06efd7b44281e68fe59c950ec7d59c649 ("ppc440spe-adma: adds updated ppc440spe adma driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/dma/ppc4xx/adma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 279a431ccae3..d0863394c723 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -4212,7 +4212,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
else
iounmap(adev->dma_reg);
err_regs_alloc:
- dma_free_coherent(adev->dev, adev->pool_size,
+ dma_free_coherent(&ofdev->dev, adev->pool_size,
adev->dma_desc_pool_virt,
adev->dma_desc_pool);
err_dma_alloc:
--
2.55.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: ppc4xx: use assigned variable for dma_free_coherent()
2026-09-11 3:59 [PATCH] dmaengine: ppc4xx: use assigned variable for dma_free_coherent() Rosen Penev
@ 2026-09-11 15:04 ` Frank Li
2026-09-11 18:08 ` Rosen Penev
0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2026-09-11 15:04 UTC (permalink / raw)
To: Rosen Penev
Cc: dmaengine, Vinod Koul, Frank Li, Yuri Tikhonov, Dan Williams,
Anatolij Gustschin, open list
On Thu, Sep 10, 2026 at 08:59:41PM -0700, Rosen Penev wrote:
> In some goto paths, adev->dev is unassigned. Use &ofdev->dev to cover
> those cases.
>
> Fixes: 12458ea06efd7b44281e68fe59c950ec7d59c649 ("ppc440spe-adma: adds updated ppc440spe adma driver")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
Please use dmam_alloc_coherent() to fix this problem.
Frank
> drivers/dma/ppc4xx/adma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
> index 279a431ccae3..d0863394c723 100644
> --- a/drivers/dma/ppc4xx/adma.c
> +++ b/drivers/dma/ppc4xx/adma.c
> @@ -4212,7 +4212,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
> else
> iounmap(adev->dma_reg);
> err_regs_alloc:
> - dma_free_coherent(adev->dev, adev->pool_size,
> + dma_free_coherent(&ofdev->dev, adev->pool_size,
> adev->dma_desc_pool_virt,
> adev->dma_desc_pool);
> err_dma_alloc:
> --
> 2.55.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: ppc4xx: use assigned variable for dma_free_coherent()
2026-09-11 15:04 ` Frank Li
@ 2026-09-11 18:08 ` Rosen Penev
0 siblings, 0 replies; 3+ messages in thread
From: Rosen Penev @ 2026-09-11 18:08 UTC (permalink / raw)
To: Frank Li, Rosen Penev
Cc: dmaengine, Vinod Koul, Frank Li, Yuri Tikhonov, Dan Williams,
Anatolij Gustschin, open list
On Fri Sep 11, 2026 at 8:04 AM PDT, Frank Li wrote:
> On Thu, Sep 10, 2026 at 08:59:41PM -0700, Rosen Penev wrote:
>> In some goto paths, adev->dev is unassigned. Use &ofdev->dev to cover
>> those cases.
>>
>> Fixes: 12458ea06efd7b44281e68fe59c950ec7d59c649 ("ppc440spe-adma: adds updated ppc440spe adma driver")
>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>> ---
>
> Please use dmam_alloc_coherent() to fix this problem.
I did just that in a future patch. Might be worthwhile to have this
first for potential backport purposes.
>
> Frank
>
>> drivers/dma/ppc4xx/adma.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
>> index 279a431ccae3..d0863394c723 100644
>> --- a/drivers/dma/ppc4xx/adma.c
>> +++ b/drivers/dma/ppc4xx/adma.c
>> @@ -4212,7 +4212,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
>> else
>> iounmap(adev->dma_reg);
>> err_regs_alloc:
>> - dma_free_coherent(adev->dev, adev->pool_size,
>> + dma_free_coherent(&ofdev->dev, adev->pool_size,
>> adev->dma_desc_pool_virt,
>> adev->dma_desc_pool);
>> err_dma_alloc:
>> --
>> 2.55.0
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-11 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 3:59 [PATCH] dmaengine: ppc4xx: use assigned variable for dma_free_coherent() Rosen Penev
2026-09-11 15:04 ` Frank Li
2026-09-11 18:08 ` Rosen Penev
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®