Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adc: ti-lmp92064: use = { } instead of memset()

Use { } instead of memset() to zero-initialize stack memory to simplify
the code.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-10-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
4c4ef744 6c25238a

+1 -3
+1 -3
drivers/iio/adc/ti-lmp92064.c
··· 200 200 struct { 201 201 u16 values[2]; 202 202 aligned_s64 timestamp; 203 - } data; 203 + } data = { }; 204 204 int ret; 205 - 206 - memset(&data, 0, sizeof(data)); 207 205 208 206 ret = lmp92064_read_meas(priv, data.values); 209 207 if (ret)