mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
iio: proximity: irsd200: 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: 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-27-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
ca2ec07860
commit
88bcfc9e7b
|
|
@ -763,10 +763,9 @@ static irqreturn_t irsd200_trigger_handler(int irq, void *pollf)
|
|||
struct {
|
||||
s16 channel;
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
} scan = { };
|
||||
int ret;
|
||||
|
||||
memset(&scan, 0, sizeof(scan));
|
||||
ret = irsd200_read_data(data, &scan.channel);
|
||||
if (ret)
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user