From: zhong jiang Date: Wed, 30 Oct 2019 01:57:53 +0000 (+0800) Subject: drm/amd/display: remove redundant null pointer check before kfree X-Git-Tag: for-linus-20191205~71^2~19^2~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5e8f5477f9d2819ea949dec4e9a68a34c7810989;p=linux-2.6-block.git 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 --- 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; }