Re: [PATCH 2/2] phy: sunplus: free the disc_vol buffer in update_disc_vol()

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 09:12:46 EST


On 2026-11-16 09:40 +0200, Andrew Gaylard wrote:
> nvmem_cell_read() returns a buffer that the caller must free.
> update_disc_vol() never frees it, so every PHY initialisation leaks
> it: at boot, and again each time the EHCI or OHCI driver is unbound
> and bound.
>
> Free the buffer after taking the disconnect-voltage level from it.
>
> Tested on a Tibbo LTPP3G2 board.
>
> Fixes: 99d9ccd97385 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021")
> Signed-off-by: Andrew Gaylard <ag@xxxxxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>

- Mani