Re: [PATCH net-next v8 10/17] net: pse-pd: Add support for PSE PIs
From: Jakub Kicinski
Date: Tue Apr 16 2024 - 22:28:47 EST
On Sun, 14 Apr 2024 16:21:59 +0200 Kory Maincent wrote:
> + pis = of_get_child_by_name(np, "pse-pis");
> + if (!pis) {
> + /* no description of PSE PIs */
> + pcdev->no_of_pse_pi = true;
> + return 0;
> + }
> +
> + pcdev->pi = kcalloc(pcdev->nr_lines, sizeof(*pcdev->pi), GFP_KERNEL);
> + if (!pcdev->pi)
> + return -ENOMEM;
leaking reference on pis here
> +
> + for_each_child_of_node(pis, node) {
> + struct pse_pi pi = {0};
> + u32 id;