Re: [PATCH] net: phy: nxp-tja11xx: cancel registration work on remove
From: Andrew Lunn
Date: Tue Jul 28 2026 - 17:14:52 EST
On Tue, Jul 28, 2026 at 08:33:35PM +0800, Hongyan Xu wrote:
> tja1102_p0_probe() schedules work to register the second port. The work
> uses the Port 0 private data and phydev. The private data is
> devm-allocated, but the driver did not cancel the work before detach.
>
> Store the Port 0 private data in phydev->priv and add a remove callback.
> The callback waits for the registration work before devres can free it.
>
> This issue was found by a static analysis tool.
>
> Signed-off-by: Hongyan Xu <getshell@xxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Please take a read of:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
The Subject: line should indicate which tree this patch should be
applied to.
Andrew