Skip to content

Commit 5e8f547

Browse files
xiongzhongjiangalexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: zhong jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 46203a5 commit 5e8f547

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction(
174174
link->ctx,
175175
link,
176176
&i2c_command);
177-
178-
if (buff)
179-
kfree(buff);
177+
kfree(buff);
180178

181179
return result;
182180
}

0 commit comments

Comments
 (0)