]> git.hungrycats.org Git - linux/commit
net: ethernet: sun4i-emac: Fix IRQ error handling
authorbui duc phuc <phucduc.bui@gmail.com>
Mon, 24 Aug 2026 10:09:01 +0000 (17:09 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:14 +0000 (13:36 +0200)
commit557599edb522af60ffb4275bf4747a210d643d3a
treea4d7acf3cbe72d0897c4987c84a34465ea7f7042
parent626614df9080d7052fbe24dc90b5434717ab7a9f
net: ethernet: sun4i-emac: Fix IRQ error handling

[ Upstream commit 991c2be78257cba5bf53cf935fe70f8836964288 ]

irq_of_parse_and_map() returns 0 when parsing or mapping an IRQ fails.
The current code checks for -ENXIO and therefore does not detect the
failure.

Check for a zero return value and convert it to -ENXIO.

Fixes: 492205050d77 ("net: Add EMAC ethernet driver found on Allwinner A10 SoC's")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Link: https://patch.msgid.link/20260824100901.31675-1-phucduc.bui@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/allwinner/sun4i-emac.c