Skip to content

Commit

Permalink
drm/amd/display: remove redundant null pointer check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhong jiang authored and Alex Deucher committed Oct 30, 2019
1 parent 46203a5 commit 5e8f547
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction(
link->ctx,
link,
&i2c_command);

if (buff)
kfree(buff);
kfree(buff);

return result;
}
Expand Down

0 comments on commit 5e8f547

Please sign in to comment.