]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: airoha: Fix error handling in airoha_ppe_flush_sram_entries()
authorWayen.Yan <win847@gmail.com>
Fri, 12 Jun 2026 09:37:00 +0000 (17:37 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 17:29:26 +0000 (10:29 -0700)
commitd7d81b00301398fcd38cf5b5869f0fdb674472ef
tree441b52a301454c79c011c3151e6fd924c4dbf682
parent05f5368cf3e9922c2459d5f08b90b5b0e4b8d289
net: airoha: Fix error handling in airoha_ppe_flush_sram_entries()

In airoha_ppe_flush_sram_entries(), the outer "err" variable was never
updated when the inner loop variable shadowed it, causing the function
to always return 0 even when airoha_ppe_foe_commit_sram_entry() fails.

Drop the outer "err" variable and return directly on error, propagating
the error code from airoha_ppe_foe_commit_sram_entry() correctly.

Fixes: 620d7b91aadb ("net: airoha: ppe: Flush PPE SRAM table during PPE setup")
Link: https://lore.kernel.org/netdev/6a2b40e4.4dd82583.3a5c46.e52f@mx.google.com/
Signed-off-by: Wayen.Yan <win847@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/6a2bd37a.4034e349.1b41bb.1caf@mx.google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_ppe.c