linux_dsm_epyc7002/drivers/gpu/drm/amd
Arnd Bergmann 48a4438718 drm/amdkfd: fix uninitialized variable use
When CONFIG_ACPI is disabled, we never initialize the acpi_table
structure in kfd_create_crat_image_virtual:

drivers/gpu/drm/amd/amdkfd/kfd_crat.c: In function 'kfd_create_crat_image_virtual':
drivers/gpu/drm/amd/amdkfd/kfd_crat.c:888:40: error: 'acpi_table' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The undefined behavior also happens for any other acpi_get_table()
failure, but then the compiler can't warn about it.

This adds an error check that prevents the structure from
being used in error, avoiding both the undefined behavior and
the warning about it.

Fixes: 520b8fb755 ("drm/amdkfd: Add topology support for CPUs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2018-03-15 17:49:40 +01:00
..
acp drm/amdgpu: Remove wrapper layer of cgs irq handling 2018-03-21 14:36:58 -05:00
amdgpu Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next 2018-03-26 10:01:11 +10:00
amdkfd drm/amdkfd: fix uninitialized variable use 2018-03-15 17:49:40 +01:00
display drm/amdgpu: Remove wrapper layer of cgs irq handling 2018-03-21 14:36:58 -05:00
include drm/amdgpu: Remove wrapper layer of cgs irq handling 2018-03-21 14:36:58 -05:00
lib drm/amdgpu: add license to Makefiles 2017-12-07 11:51:10 -05:00
powerplay drm/amd/pp: clean header file hwmgr.h 2018-03-23 09:42:42 -05:00