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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 12:06:27 +0000 (13:06 +0100)
commit145fadf6d99a91ad41fd0a6e9357afec827a046f
treea84b0db9ee22ef6789f496707c8a37c97c3f0411
parenta6c91087f5d5bafdbd073ad8e9fcc0100635f36d
ALSA: timer: Simplify error path in snd_timer_open()

[ Upstream commit 41672c0c24a62699d20aab53b98d843b16483053 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/timer.c