Skip to content

Commit 424ade3

Browse files
committed
Revert "STM32F7 HAL CRYPT patch to add missing UNLOCK"
This reverts commit 7847ad7.
1 parent b0fea78 commit 424ade3

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_cryp.c

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,10 +1021,6 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
10211021

10221022
default:
10231023
hcryp->ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED;
1024-
1025-
/* Process unlocked */
1026-
__HAL_UNLOCK(hcryp); // MBED patch
1027-
10281024
return HAL_ERROR;
10291025
}
10301026

@@ -1061,10 +1057,6 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
10611057

10621058
default:
10631059
hcryp->ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED;
1064-
1065-
/* Process unlocked */
1066-
__HAL_UNLOCK(hcryp); // MBED patch
1067-
10681060
return HAL_ERROR;
10691061
}
10701062
#endif /*end AES or CRYP */
@@ -1073,10 +1065,10 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
10731065
{
10741066
/* Change the CRYP peripheral state */
10751067
hcryp->State = HAL_CRYP_STATE_READY;
1076-
}
1077-
1068+
10781069
/* Process unlocked */
1079-
__HAL_UNLOCK(hcryp); // MBED patch
1070+
__HAL_UNLOCK(hcryp);
1071+
}
10801072
}
10811073
else
10821074
{
@@ -1194,10 +1186,6 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
11941186

11951187
default:
11961188
hcryp->ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED;
1197-
1198-
/* Process unlocked */
1199-
__HAL_UNLOCK(hcryp); // MBED patch
1200-
12011189
return HAL_ERROR;
12021190
}
12031191

@@ -1242,10 +1230,10 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
12421230
{
12431231
/* Change the CRYP peripheral state */
12441232
hcryp->State = HAL_CRYP_STATE_READY;
1233+
1234+
/* Process unlocked */
1235+
__HAL_UNLOCK(hcryp);
12451236
}
1246-
1247-
/* Process unlocked */
1248-
__HAL_UNLOCK(hcryp); // MBED patch
12491237
}
12501238
else
12511239
{

0 commit comments

Comments
 (0)