From: Dmytro Laktyushkin <Dmytro.Laktyushkin@xxxxxxx> mod_vmid is missing a destructor. Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@xxxxxxx> Reviewed-by: Charlene Liu <Charlene.Liu@xxxxxxx> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h | 2 ++ drivers/gpu/drm/amd/display/modules/vmid/vmid.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h b/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h index c7672f3b837f..a3787fdf0c08 100644 --- a/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h @@ -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_ */ diff --git a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c index 431052626d93..f0a153704f6e 100644 --- a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c +++ b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c @@ -156,3 +156,12 @@ struct mod_vmid *mod_vmid_create( 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); + } +} -- 2.20.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx