dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
@ 2024-05-18 10:05 Siddharth Vadapalli
  2024-05-21 14:44 ` Péter Ujfalusi
  2024-05-21 18:12 ` Markus Elfring
  0 siblings, 2 replies; 5+ messages in thread
From: Siddharth Vadapalli @ 2024-05-18 10:05 UTC (permalink / raw)
  To: peter.ujfalusi, vkoul
  Cc: dmaengine, linux-kernel, linux-arm-kernel, srk, s-vadapalli

The of_k3_udma_glue_parse_chn_by_id() helper function erroneously
invokes "of_node_put()" on the "udmax_np" device-node passed to it,
without having incremented its reference at any point. Fix it.

Fixes: 81a1f90f20af ("dmaengine: ti: k3-udma-glue: Add function to parse channel by ID")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

Hello,

This patch is based on commit
4b377b4868ef kprobe/ftrace: fix build error due to bad function definition
of Mainline Linux.

Regards,
Siddharth.

 drivers/dma/ti/k3-udma-glue.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c
index c9b93055dc9d..f0a399cf45b2 100644
--- a/drivers/dma/ti/k3-udma-glue.c
+++ b/drivers/dma/ti/k3-udma-glue.c
@@ -200,12 +200,9 @@ of_k3_udma_glue_parse_chn_by_id(struct device_node *udmax_np, struct k3_udma_glu
 
 	ret = of_k3_udma_glue_parse(udmax_np, common);
 	if (ret)
-		goto out_put_spec;
+		return ret;
 
 	ret = of_k3_udma_glue_parse_chn_common(common, thread_id, tx_chn);
-
-out_put_spec:
-	of_node_put(udmax_np);
 	return ret;
 }
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
  2024-05-18 10:05 [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id() Siddharth Vadapalli
@ 2024-05-21 14:44 ` Péter Ujfalusi
  2024-05-21 18:22   ` Markus Elfring
  2024-05-21 18:12 ` Markus Elfring
  1 sibling, 1 reply; 5+ messages in thread
From: Péter Ujfalusi @ 2024-05-21 14:44 UTC (permalink / raw)
  To: Siddharth Vadapalli, vkoul; +Cc: dmaengine, linux-kernel, linux-arm-kernel, srk



On 18/05/2024 13:05, Siddharth Vadapalli wrote:
> The of_k3_udma_glue_parse_chn_by_id() helper function erroneously
> invokes "of_node_put()" on the "udmax_np" device-node passed to it,
> without having incremented its reference at any point. Fix it.

Acked-by: Peter Ujfalusi@gmail.com

> 
> Fixes: 81a1f90f20af ("dmaengine: ti: k3-udma-glue: Add function to parse channel by ID")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> 
> Hello,
> 
> This patch is based on commit
> 4b377b4868ef kprobe/ftrace: fix build error due to bad function definition
> of Mainline Linux.
> 
> Regards,
> Siddharth.
> 
>  drivers/dma/ti/k3-udma-glue.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c
> index c9b93055dc9d..f0a399cf45b2 100644
> --- a/drivers/dma/ti/k3-udma-glue.c
> +++ b/drivers/dma/ti/k3-udma-glue.c
> @@ -200,12 +200,9 @@ of_k3_udma_glue_parse_chn_by_id(struct device_node *udmax_np, struct k3_udma_glu
>  
>  	ret = of_k3_udma_glue_parse(udmax_np, common);
>  	if (ret)
> -		goto out_put_spec;
> +		return ret;
>  
>  	ret = of_k3_udma_glue_parse_chn_common(common, thread_id, tx_chn);
> -
> -out_put_spec:
> -	of_node_put(udmax_np);
>  	return ret;
>  }
>  

-- 
Péter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
  2024-05-18 10:05 [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id() Siddharth Vadapalli
  2024-05-21 14:44 ` Péter Ujfalusi
@ 2024-05-21 18:12 ` Markus Elfring
  1 sibling, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2024-05-21 18:12 UTC (permalink / raw)
  To: Siddharth Vadapalli, dmaengine, linux-arm-kernel,
	Péter Ujfalusi, Vinod Koul
  Cc: LKML, Sriramakrishnan

…
> without having incremented its reference at any point. …
                                           counter?

Regards,
Markus


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
  2024-05-21 14:44 ` Péter Ujfalusi
@ 2024-05-21 18:22   ` Markus Elfring
  2024-06-11 17:39     ` Vinod Koul
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2024-05-21 18:22 UTC (permalink / raw)
  To: Péter Ujfalusi, dmaengine, linux-arm-kernel
  Cc: LKML, Siddharth Vadapalli, Sriramakrishnan, Vinod Koul

…
> > without having incremented its reference at any point. Fix it.
>
> Acked-by: Peter Ujfalusi@gmail.com

Please improve the data representation for this tag.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9#n468

Regards,
Markus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
  2024-05-21 18:22   ` Markus Elfring
@ 2024-06-11 17:39     ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2024-06-11 17:39 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Péter Ujfalusi, dmaengine, linux-arm-kernel, LKML,
	Siddharth Vadapalli, Sriramakrishnan

On 21-05-24, 20:22, Markus Elfring wrote:
> …
> > > without having incremented its reference at any point. Fix it.
> >
> > Acked-by: Peter Ujfalusi@gmail.com
> 
> Please improve the data representation for this tag.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9#n468

Please STOP wasting time of everyone. Go write some code which solves
something!

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-11 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-18 10:05 [PATCH] dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id() Siddharth Vadapalli
2024-05-21 14:44 ` Péter Ujfalusi
2024-05-21 18:22   ` Markus Elfring
2024-06-11 17:39     ` Vinod Koul
2024-05-21 18:12 ` 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).