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:
parent
1a7d296d16
commit
c00d56fede
@ -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_ */
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user