fix submitted by Andy Schneider <andy.schneider@bjss.co.uk>
[openssl.git] / crypto / engine / hw_ncipher.c
index da52912462a28b571b949068d3c3770f089d02cf..39cf7f56dc836f22613d52fe21ed3408463be690 100644 (file)
@@ -1204,8 +1204,8 @@ static int hwcrhk_mutex_init(HWCryptoHook_Mutex* mt,
        {
        mt->lockid = CRYPTO_get_new_dynlockid();
        if (mt->lockid == 0)
-               return -1;
-       return 0;
+               return 1; /* failure */
+       return 0; /* success */
        }
 
 static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt)