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:
parent
f47f23f1a0
commit
ddeff276a4
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue