Re: [PATCH] misc: lan966x_pci: depopulate children on populate failure

From: Herve Codina

Date: Tue Jun 16 2026 - 02:28:18 EST


Hi Pengpeng,

On Tue, 16 Jun 2026 08:43:04 +0800
Pengpeng Hou <pengpeng@xxxxxxxxxxx> wrote:

> lan966x_pci_probe() loads the device-tree overlay and then populates
> child devices from it. If of_platform_default_populate() fails after
> creating any children, the error path removes the overlay without first
> depopulating the partially-created children.
>
> Mirror the remove path ordering on the populate failure path by
> depopulating child devices before unloading the overlay.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---
> drivers/misc/lan966x_pci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Indeed, thanks for the patch.

Reviewed-by: Herve Codina <herve.codina@xxxxxxxxxxx>

Best regards,
Hervé