Re: [PATCH 3/6] soc/tegra: fuse: Add function to add lookups

From: Andy Shevchenko
Date: Fri Aug 18 2023 - 10:07:07 EST


On Fri, Aug 18, 2023 at 03:00:25PM +0530, Kartik wrote:
> Add helper function tegra_fuse_add_lookups() to register Tegra fuse
> nvmem lookups. So, this can be shared between tegra_fuse_init() and
> ACPI probe, which is to be introduced later.

...

> + size = sizeof(*fuse->lookups) * fuse->soc->num_lookups;

At least this should use size_mul().

> + fuse->lookups = kmemdup(fuse->soc->lookups, size, GFP_KERNEL);
> + if (!fuse->lookups)
> + return -ENOMEM;

But ideally you need to add a patch that brings kmemdup_array().

Okay, it seems it's in the original code :-(
Can you add in your ToDo list to amend this?

--
With Best Regards,
Andy Shevchenko