]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock)
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Mar 2025 10:56:54 +0000 (11:56 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 9 Apr 2025 18:47:30 +0000 (20:47 +0200)
commit891146645e5d55166847b8e004a30fb9f8b03266
tree83c022aacaff302170457741d663960eb7a245ae
parentf11cc2af8f4b3d5e81dd9b8fb1a9185a6ca6e7db
PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock)

Split the lock protected functionality of msix_capability_init() out into a
helper function and use guard(msi_desc_lock) to replace the lock/unlock
pair.

Simplify the error path in the helper function by utilizing a custom
cleanup to get rid of the remaining gotos.

No functional change intended.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/all/20250319105506.564105011@linutronix.de
drivers/pci/msi/msi.c