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
|
@ -311,8 +311,10 @@ static int uart_stm32_init(struct device *dev)
|
|||
|
||||
__uart_stm32_get_clock(dev);
|
||||
/* enable clock */
|
||||
clock_control_on(data->clock,
|
||||
(clock_control_subsys_t *)&config->pclken);
|
||||
if (clock_control_on(data->clock,
|
||||
(clock_control_subsys_t *)&config->pclken) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
LL_USART_Disable(UartInstance);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue