From c7fac09d42222391415733e1ad6fa2bba16f71b4 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 6 Nov 2019 16:14:39 +0100 Subject: [PATCH] drivers/hd44780: fix potential hardfault on initialization Co-authored-by Benjamin Valentin --- drivers/hd44780/hd44780.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hd44780/hd44780.c b/drivers/hd44780/hd44780.c index 73b2a60729..4895c9b9db 100644 --- a/drivers/hd44780/hd44780.c +++ b/drivers/hd44780/hd44780.c @@ -118,6 +118,7 @@ int hd44780_init(hd44780_t *dev, const hd44780_params_t *params) } } /* set mode depending on configured pins */ + dev->flag = 0; if (count_pins < HD44780_MAX_PINS) { dev->flag |= HD44780_4BITMODE; }