[PATCH 0/2] Use scoped_guard to safely manage mutex locking
From: Erick Karanja
Date: Thu May 01 2025 - 11:57:00 EST
This change replaces manual mutex locking/unlocking with scoped_guard
to ensure mutexes are always released safely, even in the presence of
early returns or errors. It simplifies control flow and eliminates the
need for explicit goto-based cleanup blocks.
Erick Karanja (2):
PCI: endpoint: Replace manual mutex handling with scoped_guard()
PCI: endpoint: Use scoped_guard for manual mutex lock/unlock
drivers/pci/endpoint/functions/pci-epf-mhi.c | 358 +++++++++----------
drivers/pci/endpoint/pci-epc-core.c | 53 ++-
2 files changed, 190 insertions(+), 221 deletions(-)
--
2.43.0