Commit d7a1b559 authored by Lyude Paul's avatar Lyude Paul Committed by Alex Deucher

drm/amdgpu/dm/mst: Remove unnecessary NULL check

kfree() checks this automatically.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f8d2d39e
...@@ -144,10 +144,8 @@ dm_dp_mst_connector_destroy(struct drm_connector *connector) ...@@ -144,10 +144,8 @@ dm_dp_mst_connector_destroy(struct drm_connector *connector)
struct amdgpu_dm_connector *amdgpu_dm_connector = to_amdgpu_dm_connector(connector); struct amdgpu_dm_connector *amdgpu_dm_connector = to_amdgpu_dm_connector(connector);
struct amdgpu_encoder *amdgpu_encoder = amdgpu_dm_connector->mst_encoder; struct amdgpu_encoder *amdgpu_encoder = amdgpu_dm_connector->mst_encoder;
if (amdgpu_dm_connector->edid) { kfree(amdgpu_dm_connector->edid);
kfree(amdgpu_dm_connector->edid); amdgpu_dm_connector->edid = NULL;
amdgpu_dm_connector->edid = NULL;
}
drm_encoder_cleanup(&amdgpu_encoder->base); drm_encoder_cleanup(&amdgpu_encoder->base);
kfree(amdgpu_encoder); kfree(amdgpu_encoder);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment