Conditionally include exit label

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index e64d172..b78e869 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -7363,7 +7363,9 @@
                                         slot,
                                         peer_key, peer_key_length);
 
+#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
 exit:
+#endif
     if (status != PSA_SUCCESS) {
         psa_key_derivation_abort(operation);
     } else {