mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 05:18:45 +02:00
iio: pressure: bmp280: Fix uninitialized variable
clang found that the "offset" in bmp580_trigger_handler doesn't get initialized before access. Add proper initialization to this variable. Signed-off-by: Yo-Jung Lin (Leo) <0xff07@gmail.com> Link: https://patch.msgid.link/20241011115334.367736-1-0xff07@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
220c71dafa
commit
f32ea7aab3
|
|
@ -2222,6 +2222,8 @@ static irqreturn_t bmp580_trigger_handler(int irq, void *p)
|
|||
goto out;
|
||||
}
|
||||
|
||||
offset = 0;
|
||||
|
||||
/* Pressure calculations */
|
||||
memcpy(&data->sensor_data[offset], &data->buf[3], 3);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user