diff options
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index c680f1bbd387..1f8505c23548 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -792,6 +792,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
792 | if (args.token == RTAS_UNKNOWN_SERVICE) | 792 | if (args.token == RTAS_UNKNOWN_SERVICE) |
793 | return -EINVAL; | 793 | return -EINVAL; |
794 | 794 | ||
795 | args.rets = &args.args[nargs]; | ||
796 | memset(args.rets, 0, args.nret * sizeof(rtas_arg_t)); | ||
797 | |||
795 | /* Need to handle ibm,suspend_me call specially */ | 798 | /* Need to handle ibm,suspend_me call specially */ |
796 | if (args.token == ibm_suspend_me_token) { | 799 | if (args.token == ibm_suspend_me_token) { |
797 | rc = rtas_ibm_suspend_me(&args); | 800 | rc = rtas_ibm_suspend_me(&args); |
@@ -808,8 +811,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
808 | enter_rtas(__pa(&rtas.args)); | 811 | enter_rtas(__pa(&rtas.args)); |
809 | args = rtas.args; | 812 | args = rtas.args; |
810 | 813 | ||
811 | args.rets = &args.args[nargs]; | ||
812 | |||
813 | /* A -1 return code indicates that the last command couldn't | 814 | /* A -1 return code indicates that the last command couldn't |
814 | be completed due to a hardware error. */ | 815 | be completed due to a hardware error. */ |
815 | if (args.rets[0] == -1) | 816 | if (args.rets[0] == -1) |