drivers/gpio: stm32: Check return value of clock_control_on api call

In function gpio_stm32_enable_int, retiurn value of clock_control_on
was not checked.
This is reported as an issue by coverity (CID 219652).
Fix this.

Fixes #33035

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-03-08 08:40:04 +01:00 committed by Anas Nashif
commit ddeff276a4

View file

@ -363,8 +363,13 @@ static int gpio_stm32_enable_int(int port, int pin)
.enr = LL_APB2_GRP1_PERIPH_SYSCFG
#endif /* CONFIG_SOC_SERIES_STM32H7X */
};
int ret;
/* Enable SYSCFG clock */
clock_control_on(clk, (clock_control_subsys_t *) &pclken);
ret = clock_control_on(clk, (clock_control_subsys_t *) &pclken);
if (ret != 0) {
return ret;
}
#endif
gpio_stm32_set_exti_source(port, pin);