FF-A: Error code should be 32-bit sized

Change-Id: I35a17d4801cdb9456a68495a248807aacb175e8d
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/inc/vmapi/hf/ffa.h b/inc/vmapi/hf/ffa.h
index 2cb0514..4e09301 100644
--- a/inc/vmapi/hf/ffa.h
+++ b/inc/vmapi/hf/ffa.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2019 The Hafnium Authors.
+ * Copyright 2021 The Hafnium Authors.
  *
  * Use of this source code is governed by a BSD-style
  * license that can be found in the LICENSE file or at
@@ -228,6 +228,11 @@
 	uint64_t arg7;
 };
 
+static inline int32_t ffa_error_code(struct ffa_value val)
+{
+	return (int32_t)val.arg2;
+}
+
 static inline ffa_vm_id_t ffa_msg_send_sender(struct ffa_value args)
 {
 	return (args.arg1 >> 16) & 0xffff;