提交 851dd75d 编写于 作者: M Markus Elfring 提交者: Rob Clark

drm/msm/hdmi: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NRob Clark <robdclark@gmail.com>
上级 5745d21f
...@@ -1430,7 +1430,7 @@ struct hdmi_hdcp_ctrl *msm_hdmi_hdcp_init(struct hdmi *hdmi) ...@@ -1430,7 +1430,7 @@ struct hdmi_hdcp_ctrl *msm_hdmi_hdcp_init(struct hdmi *hdmi)
void msm_hdmi_hdcp_destroy(struct hdmi *hdmi) void msm_hdmi_hdcp_destroy(struct hdmi *hdmi)
{ {
if (hdmi && hdmi->hdcp_ctrl) { if (hdmi) {
kfree(hdmi->hdcp_ctrl); kfree(hdmi->hdcp_ctrl);
hdmi->hdcp_ctrl = NULL; hdmi->hdcp_ctrl = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册