diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-08-08 17:05:06 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-08-12 11:09:12 +0200 |
| commit | 090a95dbe13df9965279b588d97eda134831769c (patch) | |
| tree | 34bd255415c48aaa294d6da1e320fbbb2aa9ca88 /tools/perf/scripts/python/task-analyzer.py | |
| parent | b48a0a0a76ccecec60f0568e2af4d89994b08bec (diff) | |
pmdomain: mediatek: mfg: initialize prev_o in mtk_mfg_attach_dev()
mtk_mfg_attach_dev() reads prev_o on the first iteration of its loop,
in "if (prev_o && prev_o->freq == o->freq)", before prev_o is assigned
at the end of the loop body. On that first iteration, evaluating prev_o
reads an indeterminate value. If it is non-NULL, the condition
dereferences a stale or invalid pointer, potentially faulting or
incorrectly skipping the first OPP.
Initialize prev_o to NULL. This matches the intent as well: there is no
previous OPP to compare against on the first iteration.
Found with Clang's -Wconditional-uninitialized.
Fixes: f08e7a4e8d6ac ("pmdomain: mediatek: Add support for MFlexGraphics")
Assisted-by: Claude:claude-fable-5
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
