xtest: return out-buffer sizes unconditionally
In ta_crypt_cmd_cipher_update(), ta_crypt_cmd_cipher_do_final(),
ta_crypt_cmd_ae_update(), ta_crypt_cmd_ae_encrypt_final(), and
ta_crypt_cmd_ae_decrypt_final(), always return out-buffer sizes even if
the function doesn't return TEEC_SUCCESS.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
diff --git a/host/xtest/regression_4000.c b/host/xtest/regression_4000.c
index 0d23e48..4a0d45e 100644
--- a/host/xtest/regression_4000.c
+++ b/host/xtest/regression_4000.c
@@ -398,8 +398,7 @@
ret_orig);
}
- if (res == TEEC_SUCCESS)
- *dst_len = op.params[2].tmpref.size;
+ *dst_len = op.params[2].tmpref.size;
return res;
}
@@ -437,8 +436,7 @@
ret_orig);
}
- if (res == TEEC_SUCCESS)
- *dst_len = op.params[2].tmpref.size;
+ *dst_len = op.params[2].tmpref.size;
return res;
}
@@ -564,8 +562,7 @@
ret_orig);
}
- if (res == TEEC_SUCCESS)
- *dst_len = op.params[2].tmpref.size;
+ *dst_len = op.params[2].tmpref.size;
return res;
}
@@ -607,10 +604,8 @@
ret_orig);
}
- if (res == TEEC_SUCCESS) {
- *dst_len = op.params[2].tmpref.size;
- *tag_len = op.params[3].tmpref.size;
- }
+ *dst_len = op.params[2].tmpref.size;
+ *tag_len = op.params[3].tmpref.size;
return res;
}
@@ -651,8 +646,7 @@
ret_orig);
}
- if (res == TEEC_SUCCESS)
- *dst_len = op.params[2].tmpref.size;
+ *dst_len = op.params[2].tmpref.size;
return res;
}