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

@ -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);