Re: [PATCH] iio: Fix uninitialized variable

From: Andy Shevchenko
Date: Fri Oct 11 2024 - 06:55:08 EST


On Fri, Oct 11, 2024 at 05:37:45PM +0800, Yo-Jung (Leo) Lin wrote:
> clang found that the "offset" in bmp580_trigger_handler doesn't get
> initialized before access. Add proper initialization to this variable.

...

> struct bmp280_data *data = iio_priv(indio_dev);
> - int ret, offset;
> + int ret, offset = 0;

Can it be done closer to the actual user of it?


--
With Best Regards,
Andy Shevchenko