Re: [PATCH net-next 1/2] net: pse-pd: pd692x0: Separate configuration parsing from hardware setup

From: Jakub Kicinski
Date: Thu Aug 28 2025 - 18:12:32 EST


On Thu, 28 Aug 2025 10:46:12 +0200 Kory Maincent wrote:
> > On Fri, 22 Aug 2025 17:37:01 +0200 Kory Maincent wrote:
> > > manager = kcalloc(PD692X0_MAX_MANAGERS, sizeof(*manager),
> > > GFP_KERNEL); if (!manager)
> > > return -ENOMEM;
> > >
> > > + port_matrix = devm_kcalloc(&priv->client->dev, PD692X0_MAX_PIS,
> > > + sizeof(*port_matrix), GFP_KERNEL);
> > > + if (!port_matrix)
> > > + return -ENOMEM;
> >
> > Leaking manager..
>
> I don't think so, as manager is declared like the following it should not.
> struct pd692x0_manager *manager __free(kfree) = NULL;

Please consult documentation on the user of __free() within networking.