]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usb-audio: qcom: Adjust mutex unlock order
authorErick Karanja <karanja99erick@gmail.com>
Mon, 21 Jul 2025 11:45:53 +0000 (14:45 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Jul 2025 09:39:40 +0000 (11:39 +0200)
commit48915162b5ad598bc6fbf8959683f43664b4f6f1
tree021477af9a7ea2b067d90bb56543b4f9d78b0f88
parent9744ede7099e8a69c04aa23fbea44c15bc390c04
ALSA: usb-audio: qcom: Adjust mutex unlock order

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.

This change reorders the unlock sequence to first release chip->mutex
followed by qdev_mutex, ensuring consistency with the locking pattern.

[ fixed the code indentations and Fixes tag by tiwai ]

Fixes: 326bbc348298a ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support")
Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
Link: https://patch.msgid.link/20250721114554.1666104-1-karanja99erick@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/qcom/qc_audio_offload.c