drivers: stm32: check clock_control_on return value

Check clock_control_on return value now that it is checking appropriate
bus is used in the request.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2018-12-07 11:09:28 +01:00 committed by Anas Nashif
commit 9062e97a45
12 changed files with 52 additions and 17 deletions

View file

@ -214,7 +214,10 @@ static int rtc_stm32_init(struct device *dev)
k_sem_init(DEV_SEM(dev), 1, UINT_MAX);
DEV_DATA(dev)->cb_fn = NULL;
clock_control_on(clk, (clock_control_subsys_t *) &cfg->pclken);
if (clock_control_on(clk,
(clock_control_subsys_t *) &cfg->pclken) != 0) {
return -EIO;
}
LL_PWR_EnableBkUpAccess();
LL_RCC_ForceBackupDomainReset();