diff options
| author | Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com> | 2025-12-02 14:21:00 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-07 06:25:03 +0900 |
| commit | a017b984db205964fa3571ec5dc902d96820c351 (patch) | |
| tree | 59a08d43205086d6d0e8d758940eb376d0a57d94 /include/net/aligned_data.h | |
| parent | 7f0bc8f2c899571eb8a22aab8e34207828ccd960 (diff) | |
net: dsa: microchip: Free previously initialized ports on init failures
[ Upstream commit 0f80e21bf6229637e193248fbd284c0ec44bc0fd ]
If a port interrupt setup fails after at least one port has already been
successfully initialized, the gotos miss some resource releasing:
- the already initialized PTP IRQs aren't released
- the already initialized port IRQs aren't released if the failure
occurs in ksz_pirq_setup().
Merge 'out_girq' and 'out_ptpirq' into a single 'port_release' label.
Behind this label, use the reverse loop to release all IRQ resources
for all initialized ports.
Jump in the middle of the reverse loop if an error occurs in
ksz_ptp_irq_setup() to only release the port IRQ of the current
iteration.
Cc: stable@vger.kernel.org
Fixes: c9cd961c0d43 ("net: dsa: microchip: lan937x: add interrupt support for port phy link")
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20251120-ksz-fix-v6-4-891f80ae7f8f@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
