]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: timer: Simplify error path in snd_timer_open()
authorTakashi Iwai <tiwai@suse.de>
Thu, 28 Mar 2019 16:11:10 +0000 (17:11 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Dec 2019 15:58:51 +0000 (15:58 +0000)
commit3e16d31a94e3224ec2d9079bacc93d7eeb6f3164
tree6786f602ec63564b8c363f97e9080d8ec6d8f276
parent6c69ce12bc4caf2a3175e86a0393438e7d5380ea
ALSA: timer: Simplify error path in snd_timer_open()

commit 41672c0c24a62699d20aab53b98d843b16483053 upstream.

Just a minor refactoring to use the standard goto for error paths in
snd_timer_open() instead of open code.  The first mutex_lock() is
moved to the beginning of the function to make the code clearer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.16 as dependency of commit a39331867335
 "ALSA: timer: Fix mutex deadlock at releasing card"]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/core/timer.c