DPE: Fix logging when certificate is not returned

The new_certificate_buf and new_certificate_actual_size are only valid
if the certificate is returned, so change the condition for logging them
from create_certificate to return_certificate.

Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Change-Id: I7ac55f5028d56488854676a46b0e4f4051585b51
diff --git a/partitions/dice_protection_environment/dpe_context_mngr.c b/partitions/dice_protection_environment/dpe_context_mngr.c
index 3ccc20f..13a3719 100644
--- a/partitions/dice_protection_environment/dpe_context_mngr.c
+++ b/partitions/dice_protection_environment/dpe_context_mngr.c
@@ -689,7 +689,7 @@
     /* Log context and layer info and certificate if no error */
     log_dpe_component_ctx_metadata(derived_ctx, free_component_idx);
     log_dpe_layer_metadata(layer_ctx, linked_layer_idx);
-    if (create_certificate) {
+    if (return_certificate) {
         log_intermediate_certificate(linked_layer_idx,
                                      new_certificate_buf,
                                      *new_certificate_actual_size);