From 6e876988ded77414f1c997b406993e3133da988f Mon Sep 17 00:00:00 2001
From: Janos Follath <janos.follath@arm.com>
Date: Fri, 28 Oct 2016 14:59:12 +0100
Subject: [PATCH] Fix bug in threading sample implementation #667

---
 library/threading.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/threading.c b/library/threading.c
index 81c107544..55091e8db 100644
--- a/library/threading.c
+++ b/library/threading.c
@@ -32,7 +32,7 @@
 #if defined(MBEDTLS_THREADING_PTHREAD)
 static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex )
 {
-    if( mutex == NULL || mutex->is_valid )
+    if( mutex == NULL )
         return;
 
     mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0;