Added return code check wolfSSL_CryptHwMutexInit
This commit is contained in:
parent
c30ffad622
commit
3531b581b5
@ -837,8 +837,9 @@ int wolfSSL_CryptHwMutexInit(void)
|
||||
int wolfSSL_CryptHwMutexLock(void)
|
||||
{
|
||||
int ret = BAD_MUTEX_E;
|
||||
wolfSSL_CryptHwMutexInit(); /* Make sure HW Mutex has been initialized */
|
||||
if (wcCryptHwMutexInit) {
|
||||
/* Make sure HW Mutex has been initialized */
|
||||
ret = wolfSSL_CryptHwMutexInit();
|
||||
if (ret == 0) {
|
||||
ret = wc_LockMutex(&wcCryptHwMutex);
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user