Commit c5927537 authored by Himanshu Jha's avatar Himanshu Jha Committed by Alex Deucher

drm/amd: Remove null check before kfree

Kfree on NULL pointer is a no-op and therefore checking is redundant.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3f3333f8
......@@ -346,10 +346,8 @@ static void amdgpu_connector_free_edid(struct drm_connector *connector)
{
struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
if (amdgpu_connector->edid) {
kfree(amdgpu_connector->edid);
amdgpu_connector->edid = NULL;
}
}
static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector)
......
......@@ -607,10 +607,8 @@ int smu7_init(struct pp_smumgr *smumgr)
int smu7_smu_fini(struct pp_smumgr *smumgr)
{
if (smumgr->backend) {
kfree(smumgr->backend);
smumgr->backend = NULL;
}
cgs_rel_firmware(smumgr->device, CGS_UCODE_ID_SMU);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment