drm/amd/display: Add null check to dc_submit_i2c_oem
authorMartin Leung <martin.leung@amd.com>
Wed, 30 Oct 2019 18:19:30 +0000 (14:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 15 Jun 2022 01:38:41 +0000 (21:38 -0400)
commitac78fa502afa539cce3a285e50d7fefaf4d2115e
treed152732115458228ed89887240d9497cc2e50f0f
parentac31a24d9188a9599dfbce7664cb11e6292873a5
drm/amd/display: Add null check to dc_submit_i2c_oem

[why]
dc_submit_i2c_oem could be called with ddc null

[how]
add null check and fail the call instead

Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Martin Leung <martin.leung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c