Re: [PATCH] nvmem: layouts: sl28vpd: Fix np reference leak in sl28vpd_add_cells()
From: Michael Walle
Date: Thu Sep 17 2026 - 09:59:16 EST
On Thu Sep 17, 2026 at 2:37 PM CEST, Wentao Liang wrote:
> of_get_child_by_name() returns a node with an elevated reference count.
> nvmem_add_one_cell() only takes ownership of that reference on success,
> so the caller must drop it when the call fails. Add the missing
> of_node_put() before returning so that info.np is not leaked.
>
> Fixes: d9fae023fe86 ("nvmem: layouts: sl28vpd: Add new layout driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
There was already a patch fixing this:
https://lore.kernel.org/r/tencent_65156571568C9E4076E52D1825CC5F476A08@xxxxxx/
-michael
Attachment:
signature.asc
Description: PGP signature