diff options
| author | Nathan Chancellor <[email protected]> | 2025-05-12 21:28:55 +0000 |
|---|---|---|
| committer | Mario Limonciello <[email protected]> | 2025-05-13 16:12:44 +0000 |
| commit | f6b1eebbdbc75377f98fc9774bb86ffc270dae8e (patch) | |
| tree | bf6d164034f96bab373e24dc07845a1f5395b5e7 /rust/helpers/helpers.c | |
| parent | amd-pstate-ut: Reset amd-pstate driver mode after running selftests (diff) | |
| download | kernel-f6b1eebbdbc75377f98fc9774bb86ffc270dae8e.tar.gz kernel-f6b1eebbdbc75377f98fc9774bb86ffc270dae8e.zip | |
cpufreq/amd-pstate: Avoid shadowing ret in amd_pstate_ut_check_driver()
Clang warns (or errors with CONFIG_WERROR=y):
drivers/cpufreq/amd-pstate-ut.c:262:6: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
262 | if (ret)
| ^~~
ret is declared at the top of the function and in the for loop so the
initialization of ret is local to the loop. Remove the declaration in
the for loop so that ret is always used initialized.
Fixes: d26d16438bc5 ("amd-pstate-ut: Reset amd-pstate driver mode after running selftests")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Nathan Chancellor <[email protected]>
Acked-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mario Limonciello <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
