drm/amdgpu: Fix uninitialized variable warning in amdgpu_info_ioctl
authorMa Jun <Jun.Ma2@amd.com>
Mon, 6 May 2024 06:01:33 +0000 (14:01 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 May 2024 19:17:07 +0000 (15:17 -0400)
commit0991e49d2b73bb4189f83a49eb41cdf16976bbf6
treea6fb6ef48361a4ee934a56afd58069042875eb25
parentd768394fa99467bcf2703bde74ddc96eeb0b71fa
drm/amdgpu: Fix uninitialized variable warning in amdgpu_info_ioctl

Check the return value of amdgpu_xcp_get_inst_details, otherwise we
may use an uninitialized variable inst_mask

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c