aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch
new file mode 100644
index 00000000..20ea3720
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3997-drm-amdgpu-dm-mst-Remove-unnecessary-NULL-check.patch
@@ -0,0 +1,34 @@
+From 20173bc1e4da5377836e08900bbc8fa83aebe7ad Mon Sep 17 00:00:00 2001
+From: Lyude Paul <lyude@redhat.com>
+Date: Thu, 26 Sep 2019 18:51:04 -0400
+Subject: [PATCH 3997/4256] drm/amdgpu/dm/mst: Remove unnecessary NULL check
+
+kfree() checks this automatically.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Lyude Paul <lyude@redhat.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+index 98916da6d25f..cfca1924328e 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+@@ -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_encoder *amdgpu_encoder = amdgpu_dm_connector->mst_encoder;
+
+- if (amdgpu_dm_connector->edid) {
+- kfree(amdgpu_dm_connector->edid);
+- amdgpu_dm_connector->edid = NULL;
+- }
++ kfree(amdgpu_dm_connector->edid);
++ amdgpu_dm_connector->edid = NULL;
+
+ drm_encoder_cleanup(&amdgpu_encoder->base);
+ kfree(amdgpu_encoder);
+--
+2.17.1
+