Re: [PATCH] ata: pata_parport: switch to dynamic root device
From: Johan Hovold
Date: Fri Apr 24 2026 - 10:04:41 EST
On Fri, Apr 24, 2026 at 08:18:31PM +0900, Damien Le Moal wrote:
> 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 ?
Yeah, probably, because of the reference leak which someone may try to
fix in the meantime.
Johan