Re: [PATCH v2 1/2] nvmem: layouts: Add fixed-layout driver

From: Mathieu Dubois-Briand

Date: Mon Jun 08 2026 - 09:18:14 EST


On Tue May 19, 2026 at 4:59 PM CEST, Srinivas Kandagatla wrote:
>
>> -static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
>> +int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
>
> Export this in this patch itself.
>

Sure, I will export this here.

>> +
>> +static int fixed_layout_add_cells(struct nvmem_layout *layout)
>> +{
>> + struct device_node *np;
>> +
>> + np = of_nvmem_layout_get_container(layout->nvmem);
>> + if (!np)
>> + return -ENOENT;
>> +
>> + return nvmem_add_cells_from_dt(layout->nvmem, np);
>
> np is leaking here.
>

Right, thanks for catching this.

I'm going to send a v3 soon.

Thanks for your review.
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com