]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/xe: Fix uninitialized variables
authorMichał Winiarski <michal.winiarski@intel.com>
Tue, 23 May 2023 13:50:19 +0000 (15:50 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:34:42 +0000 (11:34 -0500)
commit35cbfe561912874a1f0d4b2ceb5fe890f0f58e46
treef1173635dc2888c31bc1dfd6d136ac2a4ec113d8
parent1e80d0c3c44806e6ff885102a937ea838a01f560
drm/xe: Fix uninitialized variables

Using uninitialized variables leads to undefined behavior.

Moreover, it causes the compiler to complain with:
../drivers/gpu/drm/xe/xe_vm.c:3265:40: error: variable 'vma' is uninitialized when used here [-Werror,-Wuninitialized]
../drivers/gpu/drm/xe/xe_rtp.c:118:36: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized]
../drivers/gpu/drm/xe/xe_mocs.c:449:3: error: variable 'flags' is uninitialized when used here [-Werror,-Wuninitialized]

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230523135020.345596-1-michal@hardline.pl
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_mocs.c
drivers/gpu/drm/xe/xe_rtp.c
drivers/gpu/drm/xe/xe_vm.c