diff options
| author | Wayen.Yan <win847@gmail.com> | 2026-06-13 03:22:31 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-16 01:44:26 +0300 |
| commit | 05173fa30add3787e7ab2e735c4ee00431994259 (patch) | |
| tree | a8b5d2f28d84fa2d7af6153972e7a7301434c960 | |
| parent | 14dacf766c2518147522dbf5649228d27ef3e1ab (diff) | |
| download | linux-05173fa30add3787e7ab2e735c4ee00431994259.tar.xz | |
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.
Signed-off-by: Wayen.Yan <win847@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/6a2ca3d9.ad59c0a6.147df9.2a62@mx.google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/airoha/airoha_ppe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c index 91bcc55a6ac6..0d42f82be77a 100644 --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c @@ -277,7 +277,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; |
