summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2019-10-30 09:57:53 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-10-30 11:07:13 -0400
commit5e8f5477f9d2819ea949dec4e9a68a34c7810989 (patch)
treebce6869bdb4b3842af8193c7cd39c5c8b4c72609 /drivers/gpu/drm/amd/display
parent46203a508f64b4bfa150a9d25eab1dc891e7e650 (diff)
downloadlinux-5e8f5477f9d2819ea949dec4e9a68a34c7810989.tar.bz2
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r--drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c4
1 files changed, 1 insertions, 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;
}