drm/amd/display: add missing mod_vmid destructor

mod_vmid is missing a destructor.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Dmytro Laktyushkin 2019-05-29 11:24:35 -04:00 committed by Alex Deucher
parent 1a7d296d16
commit c00d56fede
2 changed files with 11 additions and 0 deletions

View File

@ -41,4 +41,6 @@ struct mod_vmid *mod_vmid_create(
unsigned int num_vmid,
struct dc_virtual_addr_space_config *va_config);
void mod_vmid_destroy(struct mod_vmid *mod_vmid);
#endif /* MOD_VMID_H_ */

View File

@ -156,3 +156,12 @@ fail_alloc_context:
fail_dc_null:
return NULL;
}
void mod_vmid_destroy(struct mod_vmid *mod_vmid)
{
if (mod_vmid != NULL) {
struct core_vmid *core_vmid = MOD_VMID_TO_CORE(mod_vmid);
kfree(core_vmid);
}
}