mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
iio: imu: inv_icm45600: Initializes inv_icm45600_buffer_postdisable() sleep
The sleep variable in inv_icm45600_buffer_postdisable() could be used without
being assigned in case of error. It must be initialized to 0 by default.
Fixes: 06674a72cf ("iio: imu: inv_icm45600: add buffer support in iio devices")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-iio/aPi6Xw-ZoUkW76zR@stanley.mountain/
Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
9eb98a05f0
commit
d16d1c2553
|
|
@ -370,6 +370,7 @@ static int inv_icm45600_buffer_postdisable(struct iio_dev *indio_dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
sleep = 0;
|
||||
scoped_guard(mutex, &st->lock)
|
||||
ret = _inv_icm45600_buffer_postdisable(st, sensor, watermark, &sleep);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user