]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: lan966x: Make sure to release ptp interrupt
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 13 Apr 2022 19:57:16 +0000 (21:57 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Apr 2022 21:29:38 +0000 (14:29 -0700)
When the lan966x driver is removed make sure to remove also the ptp_irq
IRQ.

Fixes: aa8457a4c2a66a ("net: lan966x: Add support for ptp interrupts")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20220413195716.3796467-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c

index 958e55596b823a6403113aa2d2f72f8081a3f73f..95830e3e2b1fbfd5e6392d70cf4de9fa594eb75a 100644 (file)
@@ -671,6 +671,9 @@ static void lan966x_cleanup_ports(struct lan966x *lan966x)
                disable_irq(lan966x->ana_irq);
                lan966x->ana_irq = -ENXIO;
        }
+
+       if (lan966x->ptp_irq)
+               devm_free_irq(lan966x->dev, lan966x->ptp_irq, lan966x);
 }
 
 static int lan966x_probe_port(struct lan966x *lan966x, u32 p,