Skip to content

Commit e1ee34e

Browse files
nordicjmcfriedt
authored andcommitted
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 <[email protected]>
1 parent 2ad1ef6 commit e1ee34e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sensor/sm351lt/sm351lt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ static int sm351lt_init(const struct device *dev)
209209
}
210210

211211
#if defined(CONFIG_SM351LT_TRIGGER)
212-
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
213212
data->dev = dev;
214213

214+
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
215215
k_sem_init(&data->gpio_sem, 0, K_SEM_MAX_LIMIT);
216216

217217
k_thread_create(&data->thread, data->thread_stack,

0 commit comments

Comments
 (0)