Re: [PATCH v2] media: atomisp: use kmalloc_array() for array space allocation

From: Andy Shevchenko
Date: Thu Aug 21 2025 - 05:27:45 EST


On Thu, Aug 21, 2025 at 04:17:42PM +0800, Qianfeng Rong wrote:
> Replace kmalloc(count * sizeof(type)) with kmalloc_array() for safer memory
> allocation and overflow prevention. Additionally, replace sizeof(type) with
> sizeof(*ptr) to improve code robustness.

LGTM, thanks.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko