drivers/watchdog: wwdg_stm32: Check return value of clock_control_on

In function wwdg_stm32_init, return value of clock_control_on
was not checked.
This is reported as an issue by coverity (CID 219600).
Fix this.

Fixes #33067

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

View file

@ -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 = {