Re: [PATCH] EDAC/altera: Fix device node reference leaks in the SDMMC ECC setup
From: Dinh Nguyen
Date: Fri Jul 17 2026 - 08:06:56 EST
On 7/17/26 05:25, Rounak Das 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_int_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.
Signed-off-by: Rounak Das <rounakdas2025@xxxxxxxxx>
---
drivers/edac/altera_edac.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
If this patch is fixing an issued, please add the Fixes tag and also a Cc: stable@xxxxxxxxxxxxxxx. For reference you can look at
Documentation/process/stable-kernel-rules.rst . Also, if you are addressing a sashiko review, add a Closes tag as well. Please see [0] as an example.
Thanks,
Dinh
[0] https://lore.kernel.org/all/20260617164303.585555-1-dinguyen@xxxxxxxxxx/