diff options
| author | Mallesh Koujalagi <mallesh.koujalagi@intel.com> | 2025-10-02 06:26:48 +0530 |
|---|---|---|
| committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2025-10-02 10:11:07 -0400 |
| commit | 07abc16c14693df703763c45e9fc0abfefc927d5 (patch) | |
| tree | 2bd413f7e24503f542b752716a65f0e5ce6718c5 /tools/perf/scripts/python/parallel-perf.py | |
| parent | ad298d9ec957414dbf3d51f3c8bca4b6d2416c0c (diff) | |
| download | linux-07abc16c14693df703763c45e9fc0abfefc927d5.tar.gz linux-07abc16c14693df703763c45e9fc0abfefc927d5.zip | |
drm/xe/xe_late_bind_fw: Initialize uval variable in xe_late_bind_fw_num_fans()
Initialize the uval variable to 0 in xe_late_bind_fw_num_fans() to fix
a potential use of uninitialized variable warning and ensure predictable
behavior.
The variable is passed by reference to xe_pcode_read() which should
populate it on success, but initializing it to 0 provides a safe
default value and follows kernel coding best practices.
v2:
- uval = 0 which serves as both a safe default and the fallback
value when the pcode read operation fails.
v3:
- Handle MMIO failure (Rodrigo)
- The function should probably return the error and make the uval as
pointer-argument, like the pcode_read.
- Change the caller of this function to propagate the error
upwards if mmio failed.
Fixes: 45832bf9c10f3 ("drm/xe/xe_late_bind_fw: Initialize late binding firmware")
Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Link: https://lore.kernel.org/r/20251002005648.3185636-1-mallesh.koujalagi@intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions
