diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-03-23 00:04:08 +0800 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-03-24 15:51:50 +0100 |
| commit | 5c709b376460ff322580c41600e31c02f7cc0307 (patch) | |
| tree | 8915c223c0dcd9e868fc6bda20ee3ada2a7b360d /rust/kernel/ptr/git@git.tavy.me:linux.git | |
| parent | 1b6f292cb94d95c9bc22e1efe592daf62c60bc2e (diff) | |
EDAC/versalnet: Fix device_node leak in mc_probe()
of_parse_phandle() returns a device_node reference that must be released with
of_node_put(). The original code never freed r5_core_node on any exit path,
causing a memory leak.
Fix this by using the automatic cleanup attribute __free(device_node) which
ensures of_node_put() is called when the variable goes out of scope.
Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Cc: <stable@kernel.org>
Link: https://patch.msgid.link/20260323-versalnet-v1-1-4ab3012635ef@gmail.com
Diffstat (limited to 'rust/kernel/ptr/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
