diff options
author | Dave Airlie <airlied@redhat.com> | 2017-10-03 14:27:14 +1000 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-06 13:05:03 -0400 |
commit | d029810caafa4e6b146274560154e3f0f0381fb5 (patch) | |
tree | df4f51e4d06cc4faa3a5dbf9db44de4e03e85a63 /drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | |
parent | 5667ff5c117f2d8735f27a267bc68a0811c55075 (diff) |
amdgpu/dc: kfree already checks for NULL.
Don't bother checking for it.
Found with the cocci ifnullfree.cocci script.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index 0c623b314577..3d65e2ab9bf1 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c @@ -85,11 +85,8 @@ static struct atom_encoder_caps_record *get_encoder_cap_record( static void destruct(struct bios_parser *bp) { - if (bp->base.bios_local_image) - kfree(bp->base.bios_local_image); - - if (bp->base.integrated_info) - kfree(bp->base.integrated_info); + kfree(bp->base.bios_local_image); + kfree(bp->base.integrated_info); } static void firmware_parser_destroy(struct dc_bios **dcb) |