]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: Fix memory leak on xe_alloc_pf_queue failure
authorNirmoy Das <nirmoy.das@intel.com>
Mon, 26 Aug 2024 16:20:35 +0000 (18:20 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Fri, 30 Aug 2024 09:38:53 +0000 (11:38 +0200)
commitc5f728de696caa35481fd84202dfbc9fecc18e0b
tree98c8a285eb109e9933cce583194b88a905349714
parent2bd87f0fc24ae29ead9808d341497f465b339c0a
drm/xe: Fix memory leak on xe_alloc_pf_queue failure

Simplify memory unwinding on error also fixing current memory
leak that can happen on error.

v2: use devm_kcalloc(Matt A)

Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240826162035.20462-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/xe_gt_pagefault.c