mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net v2] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region
@ 2023-11-05  9:51 Jan Kiszka
  2023-11-06 10:07 ` Wojciech Drewek
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2023-11-05  9:51 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	MD Danish Anwar
  Cc: netdev, linux-kernel, Lopes Ivo, Diogo Miguel (T CED IFD-PT),
	Nishanth Menon, Su, Bao Cheng (RC-CN DF FA R&D)

From: Jan Kiszka <jan.kiszka@siemens.com>

We were just continuing in this case, surely not desired.

Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - add proper tags

 drivers/net/ethernet/ti/icssg/icssg_prueth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index d119b2bb8158..845e8a782d3a 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -2063,7 +2063,7 @@ static int prueth_probe(struct platform_device *pdev)
 				       &prueth->shram);
 	if (ret) {
 		dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret);
-		pruss_put(prueth->pruss);
+		goto put_pruss;
 	}
 
 	prueth->sram_pool = of_gen_pool_get(np, "sram", 0);
@@ -2215,6 +2215,8 @@ static int prueth_probe(struct platform_device *pdev)
 
 put_mem:
 	pruss_release_mem_region(prueth->pruss, &prueth->shram);
+
+put_pruss:
 	pruss_put(prueth->pruss);
 
 put_cores:
-- 
2.35.3

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

* Re: [PATCH net v2] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region
  2023-11-05  9:51 [PATCH net v2] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region Jan Kiszka
@ 2023-11-06 10:07 ` Wojciech Drewek
  0 siblings, 0 replies; 2+ messages in thread
From: Wojciech Drewek @ 2023-11-06 10:07 UTC (permalink / raw)
  To: Jan Kiszka, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, MD Danish Anwar
  Cc: netdev, linux-kernel, Lopes Ivo, Diogo Miguel (T CED IFD-PT),
	Nishanth Menon, Su, Bao Cheng (RC-CN DF FA R&D)



On 05.11.2023 10:51, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> We were just continuing in this case, surely not desired.
> 
> Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>

> 
> Changes in v2:
>  - add proper tags
> 
>  drivers/net/ethernet/ti/icssg/icssg_prueth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
> index d119b2bb8158..845e8a782d3a 100644
> --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
> +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
> @@ -2063,7 +2063,7 @@ static int prueth_probe(struct platform_device *pdev)
>  				       &prueth->shram);
>  	if (ret) {
>  		dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret);
> -		pruss_put(prueth->pruss);
> +		goto put_pruss;
>  	}
>  
>  	prueth->sram_pool = of_gen_pool_get(np, "sram", 0);
> @@ -2215,6 +2215,8 @@ static int prueth_probe(struct platform_device *pdev)
>  
>  put_mem:
>  	pruss_release_mem_region(prueth->pruss, &prueth->shram);
> +
> +put_pruss:
>  	pruss_put(prueth->pruss);
>  
>  put_cores:

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

end of thread, other threads:[~2023-11-06 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-05  9:51 [PATCH net v2] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region Jan Kiszka
2023-11-06 10:07 ` Wojciech Drewek

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®