diff options
author | Luca Vizzarro <Luca.Vizzarro@arm.com> | 2020-09-09 15:51:11 +0100 |
---|---|---|
committer | nicola-mazzucato-arm <42373140+nicola-mazzucato-arm@users.noreply.github.com> | 2020-10-22 14:39:59 +0100 |
commit | 327e39003dc7cd8b3ab8232e54eafacccebcffe4 (patch) | |
tree | f298d50a78387b204ad8d1ae147b33563afe377d | |
parent | f1c60ef117140b79416dad1c1c2b8131ff0d30fb (diff) |
mod_scmi_clock: Fix ret val describe rates
When the rate_index parameter is set to be out of bounds
of the clock entries array, the return value should be
OUT_OF_RANGE according to the SCMIv2 spec. This commit
changes the return value from INVALID_PARAMETER to the
correct one.
Change-Id: I3f002823a3c9c710dd809953793901fbcb08fe4f
Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
-rw-r--r-- | module/scmi_clock/src/mod_scmi_clock.c | 2 |
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 fd5b0467..e277d74f 100644 --- a/module/scmi_clock/src/mod_scmi_clock.c +++ b/module/scmi_clock/src/mod_scmi_clock.c @@ -1036,7 +1036,7 @@ static int scmi_clock_describe_rates_handler(fwk_id_t service_id, /* The clock has a discrete list of frequencies */ if (index >= info.range.rate_count) { - return_values.status = SCMI_INVALID_PARAMETERS; + return_values.status = SCMI_OUT_OF_RANGE; goto exit; } |