drm/amd/display: remove redundant null pointer check before kfree
Subsystems (3)
PATCH 1/1 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.
Signed-off-by zhong jiang <[email protected]>
--- drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c +1 -3
@@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction( link->ctx, link, &i2c_command); - -if (buff) -kfree (buff); +kfree (buff);return result; }
Signature · 1 line
1.7.12.4
Quoted 4 lines · zhong jiang
kfree has taken null pointer into account. hence it is safe to remove the unnecessary check.
Signed-off-by zhong jiang <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 20 lines
--- drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c +1
-3@@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction( link->ctx, link, &i2c_command); - -if (buff) -kfree (buff); +kfree (buff);return result; }
Alex Deucher
AppliedQuoted 9 lines · Harry Wentland
Quoted 4 lines · zhong jiang
kfree has taken null pointer into account. hence it is safe to remove the unnecessary check.
Signed-off-by zhong jiang <[email protected]>Reviewed-by Harry Wentland <[email protected]>
Applied. thanks!
Alex
Quoted 26 lines
Harry
Quoted 10 lines
--- drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c +0
-0drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c static bool hdmi_14_process_transaction( · line 180
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c +1
-3@@ -174,9 +174,7 @@ static bool hdmi_14_process_transaction( link->ctx, link, &i2c_command); - -if (buff) -kfree (buff); +kfree (buff);return result; }_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel