]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
net: dsa: microchip: Fix error path in PTP IRQ setup
authorBastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Mon, 9 Mar 2026 13:15:43 +0000 (14:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Mar 2026 01:06:22 +0000 (18:06 -0700)
commit99c8c16a4aad0b37293cae213e15957c573cf79b
treedd5087d3f5ab616b200d18927b7812dc9c5e556f
parent20c1be4cc86fa34bd68496a1b8168f1af0a2ee72
net: dsa: microchip: Fix error path in PTP IRQ setup

If request_threaded_irq() fails during the PTP message IRQ setup, the
newly created IRQ mapping is never disposed. Indeed, the
ksz_ptp_irq_setup()'s error path only frees the mappings that were
successfully set up.

Dispose the newly created mapping if the associated
request_threaded_irq() fails at setup.

Cc: stable@vger.kernel.org
Fixes: d0b8fec8ae505 ("net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}()")
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20260309-ksz-ptp-irq-fix-v1-1-757b3b985955@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_ptp.c