net: airoha: Fix non-standard return value in airoha_ppe_get_wdma_info()
Subsystems (4)
PATCH 1/1 net: airoha: Fix non-standard return value in airoha_ppe_get_wdma_info()
airoha_ppe_get_wdma_info() returns -1 when the last path in the forwarding path stack is not of type DEV_PATH_MTK_WDMA. This is not a standard kernel error code. Replace it with -EINVAL since the input path type is invalid from the caller's perspective.
--- drivers/net/ethernet/airoha/airoha_ppe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_ppe.c +1 -1
@@ -264,7 +264,7 @@ static int airoha_ppe_get_wdma_info(struct net_device *dev, const u8 *addr, path = &stack.path[stack.num_paths -1 ];if (path->type !=DEV_PATH_MTK_WDMA ) -return -1 ; +return -EINVAL ; info->idx = path->mtk_wdma.wdma_idx; info->bss = path->mtk_wdma.bss;
Signature · 1 line
2.51.0
Quoted 4 lines
airoha_ppe_get_wdma_info()returns -1 when the last path in the forwarding path stack is not of typeDEV_PATH_MTK_WDMA. This is not a standard kernel error code. Replace it with-EINVALsince the input path type is invalid from the caller's perspective.
Quoted 24 lines
Fixes 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")Signed-off-by Wayen.Yan <[email protected]>--- drivers/net/ethernet/airoha/airoha_ppe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/airoha/airoha_ppe.c +1
-1@@ -264,7 +264,7 @@ static int airoha_ppe_get_wdma_info(struct net_device *dev, const u8 *addr, path = &stack.path[stack.num_paths -1 ];if (path->type !=DEV_PATH_MTK_WDMA ) -return -1 ; +return -EINVAL ; info->idx = path->mtk_wdma.wdma_idx; info->bss = path->mtk_wdma.bss;Signature · 1 line
2.51.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Sat, 13 Jun 2026 08:22:31 +0800 you wrote:
airoha_ppe_get_wdma_info()returns -1 when the last path in the forwarding path stack is not of typeDEV_PATH_MTK_WDMA. This is not a standard kernel error code. Replace it with-EINVALsince the input path type is invalid from the caller's perspective.Fixes 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")Signed-off-by Wayen.Yan <[email protected]>[...]
Here is the summary with links:
- net: airoha: Fix non-standard return value in airoha_ppe_get_wdma_info()
https://git.kernel.org/netdev/net-next/c/05173fa30add
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html