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:
parent
f6b014e6dd
commit
9062e97a45
12 changed files with 52 additions and 17 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue