blob: b57893e71f2d61ae872ae282eb759ea15cea8efd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|