mcst-linux-kernel/patches-2024.06.26/cpufrequtils-008/0002-cpufrequtils-aperf-Fix...

26 lines
682 B
Diff

From 67773833554300ce917da80916d3b954cd060499 Mon Sep 17 00:00:00 2001
Date: Fri, 15 Jun 2018 20:17:15 +0300
Subject: [PATCH] cpufrequtils aperf: Fix MSR read on 32-bit (patch from
debian)
---
utils/aperf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/aperf.c b/utils/aperf.c
index ff09f64..06d20f6 100644
--- a/utils/aperf.c
+++ b/utils/aperf.c
@@ -102,7 +102,7 @@ static int read_msr(int cpu, unsigned int idx, unsigned long long *val)
return -1;
if (lseek(fd, idx, SEEK_CUR) == -1)
goto err;
- if (read(fd, val, sizeof val) != sizeof *val)
+ if (read(fd, val, sizeof *val) != sizeof *val)
goto err;
close(fd);
return 0;
--
2.16.4