]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PM / devfreq: Fix a index typo in trans_stat
authorChanwoo Choi <cw00.choi@samsung.com>
Sat, 8 Feb 2025 02:13:50 +0000 (16:13 -1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 14:38:33 +0000 (16:38 +0200)
[ Upstream commit 78c5845fbbf6aaeb9959c5fbaee5cc53ef5f38c2 ]

Fixes: 4920ee6dcfaf ("PM / devfreq: Convert to use sysfs_emit_at() API")
Signed-off-by: pls <pleasurefish@126.com>
Link: https://patchwork.kernel.org/project/linux-pm/patch/20250515143100.17849-1-chanwoo@kernel.org/
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/devfreq/devfreq.c

index 713e6e52cca19f10c41be4dd7792cb70a8fa1fe4..0d9f3d3282ec94853ff18c328beb504a64c07fc8 100644 (file)
@@ -1739,7 +1739,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, " ");