Re: [PATCH] net: ehea: unwind probe_port sysfs file on failure
From: Andrew Lunn
Date: Mon Jun 15 2026 - 13:08:13 EST
>On Mon, Jun 15, 2026 at 03:00:31PM +0800, Pengpeng Hou wrote:
> ehea_create_device_sysfs() creates probe_port and then remove_port. If
> the second device_create_file() fails, the helper returns the error but
> leaves probe_port installed even though probe treats the sysfs setup as
> failed.
>
> Remove probe_port on the remove_port creation failure path so the helper
> leaves no partial sysfs state behind.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew