Fix minor issues

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
diff --git a/library/psa_crypto_cipher.c b/library/psa_crypto_cipher.c
index c309cfb..4dd2772 100644
--- a/library/psa_crypto_cipher.c
+++ b/library/psa_crypto_cipher.c
@@ -395,7 +395,7 @@
                                    input_length, output, output_length ) );
 
         if( *output_length > output_size )
-            return PSA_ERROR_CORRUPTION_DETECTED;
+            return( PSA_ERROR_CORRUPTION_DETECTED );
     }
 
     return( status );
@@ -495,8 +495,7 @@
     if( status != PSA_SUCCESS )
         goto exit;
 
-    accumulated_length += olength;
-    *output_length = accumulated_length;
+    *output_length = accumulated_length + olength;
 
 exit:
     if( status == PSA_SUCCESS )
@@ -545,8 +544,7 @@
     if( status != PSA_SUCCESS )
         goto exit;
 
-    accumulated_length += olength;
-    *output_length = accumulated_length;
+    *output_length = accumulated_length + olength;
 
 exit:
     if ( status == PSA_SUCCESS )