TencentOS-kernel/drivers/gpu/drm/amd
Nicholas Kazlauskas a64255a476 drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails
[ Upstream commit 44a09e3d95bd2b7b0c224100f78f335859c4e193 ]

[Why]
If the BIOS table is invalid or corrupt then get_i2c_info can fail
and we dereference a NULL pointer.

[How]
Check that ddc_pin is not NULL before using it and log an error if it
is because this is unexpected.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-12 12:52:47 +08:00
..
acp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
amdgpu drm/amdgpu: Add check to prevent IH overflow 2021-04-12 12:52:47 +08:00
amdkfd drm/amdkfd: Fix leak in dmabuf import 2021-03-16 16:43:21 +08:00
display drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails 2021-04-12 12:52:47 +08:00
include Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
powerplay drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running 2021-03-16 16:40:43 +08:00