Re: [PATCH] ata: pata_parport: switch to dynamic root device

From: Damien Le Moal

Date: Fri Apr 24 2026 - 07:18:42 EST


On 4/24/26 19:38, Johan Hovold wrote:
> Driver core expects devices to be dynamically allocated and will, for
> example, complain loudly when no release function has been provided.
>
> Use root_device_register() to allocate and register the root device
> instead of open coding using a static device.
>
> Note that this also fixes a reference leak in the unlikely event that
> device_register() ever fails.
>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Looks OK to me.

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

I suspect that this should go in for 7.1, right ?

--
Damien Le Moal
Western Digital Research