aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Vizzarro <Luca.Vizzarro@arm.com>2020-10-06 13:00:26 +0100
committernicola-mazzucato-arm <42373140+nicola-mazzucato-arm@users.noreply.github.com>2020-10-22 14:39:59 +0100
commit4fa85a06902f83992fda519d777128322a5ad5d5 (patch)
tree3fb1c26025ecfec700e8851d262c987541f3269e
parent171b12739443af0481439fda2cc44e3ee48aa735 (diff)
mod_scmi_clock: Fix set_request_respond
Whenever a function would return the status value FWK_E_PARAM, the set_request_respond function, which is in charge of responding to requests in certain cases, would respond with SCMI_GENERIC_ERROR. This is an erratic behaviour, as there is a specific SCMI status code, SCMI_INVALID_PARAMETERS, which is especially dedicated for parameters error as in FWK_E_PARAM. This commit fixes this behaviour by adding FWK_E_PARAM to the conditions. Change-Id: Ib2b15294433cae90ede71ebf00f1b6ad868db914 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
-rw-r--r--module/scmi_clock/src/mod_scmi_clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/scmi_clock/src/mod_scmi_clock.c b/module/scmi_clock/src/mod_scmi_clock.c
index 7093c234..1584c810 100644
--- a/module/scmi_clock/src/mod_scmi_clock.c
+++ b/module/scmi_clock/src/mod_scmi_clock.c
@@ -374,7 +374,7 @@ static void set_request_respond(fwk_id_t service_id, int status)
{
struct scmi_clock_generic_p2a return_values = { 0 };
- if (status == FWK_E_RANGE)
+ if (status == FWK_E_RANGE || status == FWK_E_PARAM)
return_values.status = SCMI_INVALID_PARAMETERS;
else if (status == FWK_E_SUPPORT)
return_values.status = SCMI_NOT_SUPPORTED;