From 4c4c22b025ba1bbd162e1e845ac29e062e08f6d9 Mon Sep 17 00:00:00 2001 From: zhong jiang 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 Signed-off-by: zhong jiang Signed-off-by: Alex Deucher --- 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