[PATCH 0/2] Use scoped_guard to safely manage mutex locking

Erick Karanja posted 2 patches 9 months, 1 week ago
drivers/pci/endpoint/functions/pci-epf-mhi.c | 358 +++++++++----------
drivers/pci/endpoint/pci-epc-core.c          |  53 ++-
2 files changed, 190 insertions(+), 221 deletions(-)
[PATCH 0/2] Use scoped_guard to safely manage mutex locking
Posted by Erick Karanja 9 months, 1 week ago
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