]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915: Change mutex initialization in intel_guc_log
authorLuiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Mon, 8 Sep 2025 13:15:11 +0000 (09:15 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 9 Sep 2025 14:35:53 +0000 (10:35 -0400)
commit1bafff0252e3e46286f558ba67d63bc16e8685cd
treecedbcfd0adce0752804c3092edc42fea2c59d840
parent793d31671bdf583c876ac9fa9948bb231c689036
drm/i915: Change mutex initialization in intel_guc_log

The intel_guc_log->relay.lock is currently initialized in
intel_guc_log_init_early(), but it lacks a corresponding destructor,
which can lead to a memory leak.

This patch replaces the use of mutex_init() with drmm_mutex_init(),
which ensures the lock is properly destroyed when the driver is
unloaded.

Signed-off-by: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250908131518.36625-4-luiz.mello@estudante.ufscar.br
Acked-by: Tvrtko Ursulin <tursulin@ursulin.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c