]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: airoha: Fix an error handling path in airoha_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 5 Jul 2025 08:34:32 +0000 (10:34 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 15:59:24 +0000 (08:59 -0700)
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 <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/1c940851b4fa3c3ed2a142910c821493a136f121.1746715755.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_eth.c

index 06dea3a13e77ce11f35dbd36966a34c5ef229c11..9057180051df0cce7682c859e004575e40056b60 100644 (file)
@@ -2984,6 +2984,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_deinit(eth);
 error_hw_cleanup:
        for (i = 0; i < ARRAY_SIZE(eth->qdma); i++)
                airoha_hw_cleanup(&eth->qdma[i]);