platform: msm_shared: Decouple save kernel hash

The hash of the kernel is sent to tz. This is only needed
when the image is verified successfully. This change prevents
sending the hash to TZ twice in case of calling the
boot_verify_compare_sha256 function twice

Change-Id: I0dbe72597fbb57164e5a223d689b9d8f26b16ba9
diff --git a/platform/msm_shared/boot_verifier.c b/platform/msm_shared/boot_verifier.c
index 4819eeb..e427f81 100644
--- a/platform/msm_shared/boot_verifier.c
+++ b/platform/msm_shared/boot_verifier.c
@@ -197,6 +197,9 @@
 	if(ret == 0)
 	{
 		auth = true;
+#ifdef TZ_SAVE_KERNEL_HASH
+		save_kernel_hash((unsigned char *) &digest, CRYPTO_AUTH_ALG_SHA256);
+#endif
 	}
 
 cleanup: