@@ -1021,10 +1021,6 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1021
1021
1022
1022
default :
1023
1023
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1024
-
1025
- /* Process unlocked */
1026
- __HAL_UNLOCK (hcryp ); // MBED patch
1027
-
1028
1024
return HAL_ERROR ;
1029
1025
}
1030
1026
@@ -1061,10 +1057,6 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1061
1057
1062
1058
default :
1063
1059
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1064
-
1065
- /* Process unlocked */
1066
- __HAL_UNLOCK (hcryp ); // MBED patch
1067
-
1068
1060
return HAL_ERROR ;
1069
1061
}
1070
1062
#endif /*end AES or CRYP */
@@ -1073,10 +1065,10 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1073
1065
{
1074
1066
/* Change the CRYP peripheral state */
1075
1067
hcryp -> State = HAL_CRYP_STATE_READY ;
1076
- }
1077
-
1068
+
1078
1069
/* Process unlocked */
1079
- __HAL_UNLOCK (hcryp ); // MBED patch
1070
+ __HAL_UNLOCK (hcryp );
1071
+ }
1080
1072
}
1081
1073
else
1082
1074
{
@@ -1194,10 +1186,6 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1194
1186
1195
1187
default :
1196
1188
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1197
-
1198
- /* Process unlocked */
1199
- __HAL_UNLOCK (hcryp ); // MBED patch
1200
-
1201
1189
return HAL_ERROR ;
1202
1190
}
1203
1191
@@ -1242,10 +1230,10 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1242
1230
{
1243
1231
/* Change the CRYP peripheral state */
1244
1232
hcryp -> State = HAL_CRYP_STATE_READY ;
1233
+
1234
+ /* Process unlocked */
1235
+ __HAL_UNLOCK (hcryp );
1245
1236
}
1246
-
1247
- /* Process unlocked */
1248
- __HAL_UNLOCK (hcryp ); // MBED patch
1249
1237
}
1250
1238
else
1251
1239
{
0 commit comments