Re: [PATCH v2] iio: common: scmi_iio: use kcalloc() instead of kzalloc()

From: Andy Shevchenko
Date: Tue Aug 19 2025 - 14:44:30 EST


On Tue, Aug 19, 2025 at 3:50 PM Qianfeng Rong <rongqianfeng@xxxxxxxx> wrote:
>
> Replace calls of devm_kzalloc() with devm_kcalloc() in scmi_alloc_iiodev()
> and scmi_iio_set_sampling_freq_avail() for safer memory allocation with
> built-in overflow protection.
>
> Similarly, Use array_size() instead of explicit multiplication for

Use --> use
(no need to resend just for this)

> 'sensor->sensor_info->intervals.count * 2'.

Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko