Thread (11 messages) 11 messages, 2 authors, 2025-05-10

Re: [PATCH v2 2/4] net: airoha: Fix an error handling path in airoha_probe()

From: Christophe JAILLET <hidden>
Date: 2025-05-08 15:30:31
Also in: kernel-janitors, linux-arm-kernel, linux-mediatek, lkml

Le 08/05/2025 à 17:10, Lorenzo Bianconi a écrit :
quoted
If an error occurs after a successful airoha_hw_init() call,
airoha_ppe_deinit() needs to be called as already done in the remove
function.

Fixes: 00a7678310fe ("net: airoha: Introduce flowtable offload support")
Signed-off-by: Christophe JAILLET <redacted>
---
Changes in v2:
   - Call airoha_ppe_init() at the right place in the error handling path
     of the probe   [Lorenzo Bianconi]

Compile tested only.
---
  drivers/net/ethernet/airoha/airoha_eth.c | 1 +
  1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index af8c4015938c..d435179875df 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -2967,6 +2967,7 @@ static int airoha_probe(struct platform_device *pdev)
  error_napi_stop:
  	for (i = 0; i < ARRAY_SIZE(eth->qdma); i++)
  		airoha_qdma_stop_napi(&eth->qdma[i]);
+	airoha_ppe_init(eth);
it was actually a typo in my previous email but this should be clearly
airoha_ppe_deinit().
My bad!
Sorry for not spotting myself it.

We can really trust no one, nowadays ! :)

The good news is that my cocci script would have spotted it the next 
time I would have run it, because it would still find a 
airoha_ppe_deinit() in the remove function, but none in the probe.

I give you some time to review the other patches, and I'll a v3 later.

CJ
Regards,
Lorenzo
quoted
  error_hw_cleanup:
  	for (i = 0; i < ARRAY_SIZE(eth->qdma); i++)
  		airoha_hw_cleanup(&eth->qdma[i]);
-- 
2.49.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help