aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch
new file mode 100644
index 00000000..b57893e7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4320-drm-amd-display-remove-redundant-null-pointer-check-.patch
@@ -0,0 +1,34 @@
+From 4c4c22b025ba1bbd162e1e845ac29e062e08f6d9 Mon Sep 17 00:00:00 2001
+From: zhong jiang <zhongjiang@huawei.com>
+Date: Wed, 30 Oct 2019 09:57:53 +0800
+Subject: [PATCH 4320/4736] drm/amd/display: remove redundant null pointer
+ check before kfree
+
+kfree has taken null pointer into account. hence it is safe to remove
+the unnecessary check.
+
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: zhong jiang <zhongjiang@huawei.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c b/drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c
+index cf6ef387e5d2..6f730b5bfe42 100644
+--- a/drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c
++++ b/drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c
+@@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction(
+ link->ctx,
+ link,
+ &i2c_command);
+-
+- if (buff)
+- kfree(buff);
++ kfree(buff);
+
+ return result;
+ }
+--
+2.17.1
+