Remove NULL pointer validation in sha512.c

Signed-off-by: Tuvshinzaya Erdenekhuu <tuvshinzaya.erdenekhuu@arm.com>
diff --git a/library/sha512.c b/library/sha512.c
index be03ec3..c575bbd 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -183,8 +183,6 @@
 
 void mbedtls_sha512_init( mbedtls_sha512_context *ctx )
 {
-    SHA512_VALIDATE( ctx != NULL );
-
     memset( ctx, 0, sizeof( mbedtls_sha512_context ) );
 }
 
@@ -199,9 +197,6 @@
 void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
                            const mbedtls_sha512_context *src )
 {
-    SHA512_VALIDATE( dst != NULL );
-    SHA512_VALIDATE( src != NULL );
-
     *dst = *src;
 }
 
@@ -210,7 +205,6 @@
  */
 int mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 )
 {
-    SHA512_VALIDATE_RET( ctx != NULL );
 #if defined(MBEDTLS_SHA384_C)
     SHA512_VALIDATE_RET( is384 == 0 || is384 == 1 );
 #else
@@ -569,9 +563,6 @@
         uint64_t A[8];
     } local;
 
-    SHA512_VALIDATE_RET( ctx != NULL );
-    SHA512_VALIDATE_RET( (const unsigned char *)data != NULL );
-
 #define  SHR(x,n) ((x) >> (n))
 #define ROTR(x,n) (SHR((x),(n)) | ((x) << (64 - (n))))
 
@@ -735,9 +726,6 @@
     size_t fill;
     unsigned int left;
 
-    SHA512_VALIDATE_RET( ctx != NULL );
-    SHA512_VALIDATE_RET( ilen == 0 || input != NULL );
-
     if( ilen == 0 )
         return( 0 );
 
@@ -788,9 +776,6 @@
     unsigned used;
     uint64_t high, low;
 
-    SHA512_VALIDATE_RET( ctx != NULL );
-    SHA512_VALIDATE_RET( (unsigned char *)output != NULL );
-
     /*
      * Add padding: 0x80 then 0x00 until 16 bytes remain for the length
      */
@@ -866,8 +851,6 @@
 #else
     SHA512_VALIDATE_RET( is384 == 0 );
 #endif
-    SHA512_VALIDATE_RET( ilen == 0 || input != NULL );
-    SHA512_VALIDATE_RET( (unsigned char *)output != NULL );
 
     mbedtls_sha512_init( &ctx );