diff options
| author | Qianfeng Rong <rongqianfeng@vivo.com> | 2025-08-19 20:50:17 +0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-08-25 10:41:51 +0100 |
| commit | ccef0530e60dc59b36cac1cae2d9a7d7f86ca99f (patch) | |
| tree | eb9e4dec644fb9d926e7e5f5eb8d9c10e1a798e8 /tools/perf/scripts/python | |
| parent | docs: iio: Fix unexpected indentation for adxl345. (diff) | |
| download | linux-ccef0530e60dc59b36cac1cae2d9a7d7f86ca99f.tar.gz linux-ccef0530e60dc59b36cac1cae2d9a7d7f86ca99f.zip | |
iio: common: scmi_iio: use kcalloc() instead of kzalloc()
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
'sensor->sensor_info->intervals.count * 2'.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250819125017.635182-1-rongqianfeng@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
