ac/rgp: Initialize clock_calibration with memset.
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value clock_calibration.
Field clock_calibration.reserved is uninitialized when calling
fwrite.
Fixes: 1ee85e8bab ("ac/rgp: add support for clock calibration")
Suggested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13783>
This commit is contained in:
@@ -1145,6 +1145,7 @@ static void ac_sqtt_dump_data(struct radeon_info *rad_info,
|
||||
list_for_each_entry_safe(struct rgp_clock_calibration_record, record,
|
||||
&rgp_clock_calibration->record, list) {
|
||||
struct sqtt_file_chunk_clock_calibration clock_calibration;
|
||||
memset(&clock_calibration, 0, sizeof(clock_calibration));
|
||||
|
||||
ac_sqtt_fill_clock_calibration(&clock_calibration, num_records);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user