diff mbox series

[Xen-devel,for-4.12] xen/arm: psci: Populate arm_smccc_res on PSCI_FEATURES call

Message ID 20190218094227.27176-1-julien.grall@arm.com
State New
Headers show
Series [Xen-devel,for-4.12] xen/arm: psci: Populate arm_smccc_res on PSCI_FEATURES call | expand

Commit Message

Julien Grall Feb. 18, 2019, 9:42 a.m. UTC
Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc"
mistakenly forgot to populate arm_smccc_res. So a garbagge value was
used as return value.

Coverity-ID: 1476827
Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Juergen Gross Feb. 18, 2019, 11:33 a.m. UTC | #1
On 18/02/2019 10:42, Julien Grall wrote:
> Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc"
> mistakenly forgot to populate arm_smccc_res. So a garbagge value was
> used as return value.
> 
> Coverity-ID: 1476827
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen
Stefano Stabellini Feb. 25, 2019, 10:13 p.m. UTC | #2
On Mon, 18 Feb 2019, Julien Grall wrote:
> Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc"
> mistakenly forgot to populate arm_smccc_res. So a garbagge value was
                                                    ^ garbage

> used as return value.
> 
> Coverity-ID: 1476827
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
>  xen/arch/arm/psci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
> index d23cb8e76e..0c90c2305c 100644
> --- a/xen/arch/arm/psci.c
> +++ b/xen/arch/arm/psci.c
> @@ -87,7 +87,7 @@ static int __init psci_features(uint32_t psci_func_id)
>      if ( psci_ver < PSCI_VERSION(1, 0) )
>          return PSCI_NOT_SUPPORTED;
>  
> -    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, NULL);
> +    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
>  
>      return PSCI_RET(res);
>  }
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index d23cb8e76e..0c90c2305c 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -87,7 +87,7 @@  static int __init psci_features(uint32_t psci_func_id)
     if ( psci_ver < PSCI_VERSION(1, 0) )
         return PSCI_NOT_SUPPORTED;
 
-    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, NULL);
+    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
 
     return PSCI_RET(res);
 }