Re: [PATCH v2] EDAC/altera: Fix device node reference leaks in the SDMMC ECC setup

From: Borislav Petkov

Date: Mon Jul 20 2026 - 12:20:39 EST


On Mon, Jul 20, 2026 at 09:13:25AM -0500, Dinh Nguyen wrote:
> > Under altr_portb_setup() and socfpga_init_sdmmc_ecc(),
> > of_find_compatible_node() was being used to look up the sdmmc-ecc
> > node. This node wasn't being dropped using of_node_put().
> >
> > altr_portb_setup() did not drop its reference under its success path
> > or on any error path.
> >
> > socfpga_init_sdmmc_ecc() did an early return thereby skipping the
> > common exit label and thus leaking the reference.
> >
> > Add the missing of_node_put() calls in altr_portb_setup(), and route
> > socfpga_init_sdmmc_ecc()'s success path through the common exit label.
> >
> > Fixes: 911049845d70 ("EDAC, altera: Add Arria10 SD-MMC EDAC support")
> > Fixes: 788586efd116 ("EDAC/altera: Initialize peripheral FIFOs in probe()")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Closes: https://sashiko.dev/#/patchset/20260708091135.94114-1-rounakdas2025%40gmail.com
> > Signed-off-by: Rounak Das <rounakdas2025@xxxxxxxxx>
> > ---
>
> Acked-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>

I'll hold off on that until the Sashiko preexisting issues have been
addressed:

https://sashiko.dev/#/patchset/20260717102549.13309-1-rounakdas2025%40gmail.com

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette