Commit a017b98
net: dsa: microchip: Free previously initialized ports on init failures
[ Upstream commit 0f80e21 ]
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: [email protected]
Fixes: c9cd961 ("net: dsa: microchip: lan937x: add interrupt support for port phy link")
Signed-off-by: Bastien Curutchet (Schneider Electric) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 7f0bc8f commit a017b98
1 file changed
+11
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
2567 | | - | |
| 2567 | + | |
2568 | 2568 | | |
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
2572 | | - | |
| 2572 | + | |
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
| |||
2579 | 2579 | | |
2580 | 2580 | | |
2581 | 2581 | | |
2582 | | - | |
| 2582 | + | |
2583 | 2583 | | |
2584 | 2584 | | |
2585 | 2585 | | |
| |||
2602 | 2602 | | |
2603 | 2603 | | |
2604 | 2604 | | |
2605 | | - | |
2606 | | - | |
2607 | | - | |
2608 | | - | |
2609 | | - | |
2610 | | - | |
2611 | | - | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
2612 | 2611 | | |
2613 | | - | |
2614 | | - | |
| 2612 | + | |
2615 | 2613 | | |
| 2614 | + | |
2616 | 2615 | | |
2617 | 2616 | | |
2618 | 2617 | | |
| |||
0 commit comments