remove superfluous calls to hash_abort

The PSA Core is already calling psa_hash_abort, so the driver doesn't
have to do that explicitly.

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
diff --git a/library/psa_crypto_hash.c b/library/psa_crypto_hash.c
index bd9a1d7..432d8a0 100644
--- a/library/psa_crypto_hash.c
+++ b/library/psa_crypto_hash.c
@@ -422,8 +422,6 @@
             return( PSA_ERROR_BAD_STATE );
     }
 
-    if( ret != 0 )
-        hash_abort( operation );
     return( mbedtls_to_psa_error( ret ) );
 }
 
@@ -507,15 +505,8 @@
 
 exit:
     if( status == PSA_SUCCESS )
-    {
         *hash_length = actual_hash_length;
-        return( hash_abort( operation ) );
-    }
-    else
-    {
-        hash_abort( operation );
-        return( status );
-    }
+    return( status );
 }
 
 static psa_status_t hash_compute(
@@ -528,6 +519,7 @@
 {
     mbedtls_psa_hash_operation_t operation = MBEDTLS_PSA_HASH_OPERATION_INIT;
     psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
+    psa_status_t abort_status = PSA_ERROR_CORRUPTION_DETECTED;
 
     *hash_length = hash_size;
     status = hash_setup( &operation, alg );
@@ -541,11 +533,12 @@
         goto exit;
 
 exit:
+    abort_status = hash_abort( &operation );
     if( status == PSA_SUCCESS )
-        status = hash_abort( &operation );
+        return( abort_status );
     else
-        hash_abort( &operation );
-    return( status );
+        return( status );
+
 }
 #endif /* INCLUDE_HASH_CORE */