From: Chanwoo Choi Date: Sat, 8 Feb 2025 02:13:50 +0000 (-1000) Subject: PM / devfreq: Fix a index typo in trans_stat X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78c5845fbbf6aaeb9959c5fbaee5cc53ef5f38c2;p=thirdparty%2Flinux.git PM / devfreq: Fix a index typo in trans_stat Fixes: 4920ee6dcfaf ("PM / devfreq: Convert to use sysfs_emit_at() API") Signed-off-by: pls Link: https://patchwork.kernel.org/project/linux-pm/patch/20250515143100.17849-1-chanwoo@kernel.org/ Signed-off-by: Chanwoo Choi --- diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 46f3a8053197b..c5f5960e643ba 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -1733,7 +1733,7 @@ static ssize_t trans_stat_show(struct device *dev, for (i = 0; i < max_state; i++) { if (len >= PAGE_SIZE - 1) break; - if (df->freq_table[2] == df->previous_freq) + if (df->freq_table[i] == df->previous_freq) len += sysfs_emit_at(buf, len, "*"); else len += sysfs_emit_at(buf, len, " ");