From 85efae6b3dada69c1b427f298585b4e6dae0b322 Mon Sep 17 00:00:00 2001 From: Erwin Rol Date: Fri, 23 Jun 2017 12:08:12 +0200 Subject: [PATCH] pinmux: stm32: directly return error if stm32_get_pin_config fails. Signed-off-by: Erwin Rol --- drivers/pinmux/stm32/pinmux_stm32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinmux/stm32/pinmux_stm32.c b/drivers/pinmux/stm32/pinmux_stm32.c index 1811f3fc6c5..fa41be645e2 100644 --- a/drivers/pinmux/stm32/pinmux_stm32.c +++ b/drivers/pinmux/stm32/pinmux_stm32.c @@ -101,6 +101,9 @@ int _pinmux_stm32_set(u32_t pin, u32_t func, /* determine config for alternate function */ config = stm32_get_pin_config(pin, func); + if (config < 0) { + return config; + } return stm32_pin_configure(pin, config, func); }