Skip to content

Commit 762a08a

Browse files
Jing LiWenlp
authored andcommitted
sw64: powercap: fix misuse of an uninitialized temporary variable
Due to typo, the temporary variable related_cpu is misused. Signed-off-by: Jing Li <[email protected]> Reviewed-by: He Sheng <[email protected]> Signed-off-by: Gu Zitao <[email protected]>
1 parent 21877d4 commit 762a08a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/platform/sw64/powercap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,10 @@ static int sunway_powercap_probe(struct platform_device *pdev)
704704
struct freq_qos_request *req;
705705

706706
/* Initial state */
707-
powercap_cpu_data[related_cpu].state = SUNWAY_POWERCAP_STATE_FREE;
707+
powercap_cpu_data[cpu].state = SUNWAY_POWERCAP_STATE_FREE;
708708

709-
powercap_cpu_data[related_cpu].core = rcid_to_core_id(rcid);
710-
powercap_cpu_data[related_cpu].node = rcid_to_domain_id(rcid);
709+
powercap_cpu_data[cpu].core = rcid_to_core_id(rcid);
710+
powercap_cpu_data[cpu].node = rcid_to_domain_id(rcid);
711711

712712
if (powercap_cpu_data[cpu].policy)
713713
continue;

0 commit comments

Comments
 (0)