File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1047,6 +1047,7 @@ static int i3c_stm32_do_daa(const struct device *dev)
1047
1047
const struct i3c_stm32_config * config = dev -> config ;
1048
1048
struct i3c_stm32_data * data = dev -> data ;
1049
1049
I3C_TypeDef * i3c = config -> i3c ;
1050
+ int ret = 0 ;
1050
1051
1051
1052
k_mutex_lock (& data -> bus_mutex , K_FOREVER );
1052
1053
@@ -1068,20 +1069,23 @@ static int i3c_stm32_do_daa(const struct device *dev)
1068
1069
1069
1070
/* Wait for DAA to finish */
1070
1071
if (k_sem_take (& data -> device_sync_sem , STM32_I3C_TRANSFER_TIMEOUT ) != 0 ) {
1071
- return - ETIMEDOUT ;
1072
+ ret = - ETIMEDOUT ;
1073
+ goto i3c_stm32_do_daa_ending ;
1072
1074
}
1073
1075
1074
1076
if (data -> msg_state == STM32_I3C_MSG_ERR ) {
1075
1077
i3c_stm32_clear_err (dev , false);
1076
1078
/* Enable TXFNF interrupt in case an error occurred before it was enabled by RXFNE
1077
1079
*/
1078
1080
LL_I3C_EnableIT_TXFNF (i3c );
1079
- return - EIO ;
1081
+ ret = - EIO ;
1082
+ goto i3c_stm32_do_daa_ending ;
1080
1083
}
1081
1084
1085
+ i3c_stm32_do_daa_ending :
1082
1086
k_mutex_unlock (& data -> bus_mutex );
1083
1087
1084
- return 0 ;
1088
+ return ret ;
1085
1089
}
1086
1090
1087
1091
#ifdef CONFIG_I3C_STM32_DMA
You can’t perform that action at this time.
0 commit comments