Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32: coverity fixes (gpio and watchdog) #33124

Merged
merged 2 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion drivers/gpio/gpio_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions drivers/watchdog/wdt_wwdg_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,9 @@ static int wwdg_stm32_init(const struct device *dev)
const struct device *clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
const struct wwdg_stm32_config *cfg = WWDG_STM32_CFG(dev);

clock_control_on(clk, (clock_control_subsys_t *) &cfg->pclken);

wwdg_stm32_irq_config(dev);

return 0;
return clock_control_on(clk, (clock_control_subsys_t *) &cfg->pclken);
}

static struct wwdg_stm32_data wwdg_stm32_dev_data = {
Expand Down