summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2025-10-22 12:38:35 +0200
committerNamhyung Kim <namhyung@kernel.org>2025-10-27 11:30:15 -0700
commit2fee899c068c159e486e62623afe9e2a4975bd79 (patch)
treefdbd502fc1401b766e992333d50bb50aad7cdede /tools/perf/scripts/python
parentab29ff9f6fe06d23c16b5565fcae96bad21be900 (diff)
downloadlinux-2fee899c068c159e486e62623afe9e2a4975bd79.tar.gz
linux-2fee899c068c159e486e62623afe9e2a4975bd79.zip
perf hwmon_pmu: Fix uninitialized variable warning
The line_len is only set on success. Check the return value instead. util/hwmon_pmu.c: In function ‘perf_pmus__read_hwmon_pmus’: util/hwmon_pmu.c:742:20: warning: ‘line_len’ may be used uninitialized [-Wmaybe-uninitialized] 742 | if (line_len > 0 && line[line_len - 1] == '\n') | ^ util/hwmon_pmu.c:719:24: note: ‘line_len’ was declared here 719 | size_t line_len; Fixes: 53cc0b351ec9 ("perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions