Skip to content

Commit fce8d45

Browse files
avpatelgregkh
authored andcommitted
ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
commit 5b37065 upstream. The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must not use sbi_err_map_linux_errno() for FFH_CPPC_CSR. Fixes: 30f3ffb ("ACPI: RISC-V: Add CPPC driver") Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Nutty Liu <nutty.liu@hotmail.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250818143600.894385-2-apatel@ventanamicro.com Signed-off-by: Paul Walmsley <pjw@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 514600e commit fce8d45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/acpi/riscv/cppc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val)
121121

122122
*val = data.ret.value;
123123

124-
return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
124+
return data.ret.error;
125125
}
126126

127127
return -EINVAL;
@@ -150,7 +150,7 @@ int cpc_write_ffh(int cpu, struct cpc_reg *reg, u64 val)
150150

151151
smp_call_function_single(cpu, cppc_ffh_csr_write, &data, 1);
152152

153-
return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0;
153+
return data.ret.error;
154154
}
155155

156156
return -EINVAL;

0 commit comments

Comments
 (0)