drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails
stable inclusion from stable-5.10.21 commit a986f9345467b8d39f0aff39d80207e4e91aae0c bugzilla: 50609 -------------------------------- [ Upstream commit 44a09e3d ] [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> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment