Re: [PATCH net-next 1/2] net: pse-pd: pd692x0: Separate configuration parsing from hardware setup
From: Kory Maincent
Date: Thu Aug 28 2025 - 04:47:00 EST
Le Mon, 25 Aug 2025 15:10:01 -0700,
Jakub Kicinski <kuba@xxxxxxxxxx> a écrit :
> 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;
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com