drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc()
authorShuicheng Lin <shuicheng.lin@intel.com>
Thu, 24 Jul 2025 19:38:55 +0000 (19:38 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 28 Jul 2025 14:22:43 +0000 (10:22 -0400)
commit4846856c3a4afa882b6d1b842ed2fad6f3781f4d
tree7f65ce0211690347831746fdf0f9aa338cdcce1c
parenta2e1407eb8405e59c56b2325d910a73fd917eb3e
drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc()

Memory allocated with drmm_kzalloc() should not be freed using
kfree(), as it is managed by the DRM subsystem. The memory will
be automatically freed when the associated drm_device is released.
These 3 group pointers are allocated using drmm_kzalloc() in
hw_engine_group_alloc(), so they don't require manual deallocation.

Fixes: 67979060740f ("drm/xe/hw_engine_group: Fix potential leak")
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20250724193854.1124510-2-shuicheng.lin@intel.com
(cherry picked from commit f98de826b418885a21ece67f0f5b921ae759b7bf)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_hw_engine_group.c