Skip to content

Commit e9098cc

Browse files
melissawenalexdeucher
authored andcommitted
drm/amd/display: check dc_link before dereferencing
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6683 amdgpu_dm_connector_funcs_force() warn: variable dereferenced before check 'dc_link' (see line 6663) Fixes: 9671761 ("drm/amd/display: fix null-pointer dereference on edid reading") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Melissa Wen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6601c15 commit e9098cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6539,7 +6539,7 @@ static void amdgpu_dm_connector_funcs_force(struct drm_connector *connector)
65396539
struct edid *edid;
65406540
struct i2c_adapter *ddc;
65416541

6542-
if (dc_link->aux_mode)
6542+
if (dc_link && dc_link->aux_mode)
65436543
ddc = &aconnector->dm_dp_aux.aux.ddc;
65446544
else
65456545
ddc = &aconnector->i2c->base;

0 commit comments

Comments
 (0)