Skip to content

Commit f684b10

Browse files
committed
ACPI: CPPC: Drop redundant local variable from cpc_read()
The ret_val local variable in cpc_read() is not necessary, so eliminate it. No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Huang Rui <ray.huang@amd.com>
1 parent 5f51c7c commit f684b10

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/acpi/cppc_acpi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,14 +915,13 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val)
915915

916916
static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
917917
{
918-
int ret_val = 0;
919918
void __iomem *vaddr = NULL;
920919
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
921920
struct cpc_reg *reg = &reg_res->cpc_entry.reg;
922921

923922
if (reg_res->type == ACPI_TYPE_INTEGER) {
924923
*val = reg_res->cpc_entry.int_value;
925-
return ret_val;
924+
return 0;
926925
}
927926

928927
*val = 0;
@@ -968,10 +967,10 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
968967
default:
969968
pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n",
970969
reg->bit_width, pcc_ss_id);
971-
ret_val = -EFAULT;
970+
return -EFAULT;
972971
}
973972

974-
return ret_val;
973+
return 0;
975974
}
976975

977976
static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)

0 commit comments

Comments
 (0)