drivers: sensor: sm351lt: Fix global thread triggering bug

This fixes a bug in the sm351lt driver whereby global triggering will
cause an MPU fault due to an unset pointer.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2022-08-02 17:10:34 +01:00 committed by Christopher Friedt
parent 2ad1ef651b
commit e1ee34e55c
1 changed files with 1 additions and 1 deletions

View File

@ -209,9 +209,9 @@ static int sm351lt_init(const struct device *dev)
}
#if defined(CONFIG_SM351LT_TRIGGER)
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
data->dev = dev;
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
k_sem_init(&data->gpio_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack,