On Thu, Apr 25, 2024 at 6:07 AM Ma Jun <jun....@amd.com> wrote: > > Assign value to clock to fix the warning below: > "Using uninitialized value res. Field res.clock is uninitialized" > > Signed-off-by: Ma Jun <jun....@amd.com>
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c > index a4d65973bf7c..80771b1480ff 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c > @@ -100,6 +100,7 @@ struct amdgpu_afmt_acr amdgpu_afmt_acr(uint32_t clock) > amdgpu_afmt_calc_cts(clock, &res.cts_32khz, &res.n_32khz, 32000); > amdgpu_afmt_calc_cts(clock, &res.cts_44_1khz, &res.n_44_1khz, 44100); > amdgpu_afmt_calc_cts(clock, &res.cts_48khz, &res.n_48khz, 48000); > + res.clock = clock; > > return res; > } > -- > 2.34.1 >