Re: [PATCH v4] ALSA: usb-audio: qcom: Adjust mutex unlock order

From: Markus Elfring
Date: Mon Jul 21 2025 - 11:00:42 EST


> The mutexes qdev_mutex and chip->mutex are acquired in that order
> throughout the driver. To preserve proper lock hierarchy and avoid
> potential deadlocks, they must be released in the reverse
> order of acquisition.

Would you become interested to benefit any more from lock guards?
https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225

Regards,
Markus