[RAMEN9610-21500]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)
committerlingsen1 <lingsen1@lenovo.com>
Fri, 27 Mar 2020 03:19:30 +0000 (11:19 +0800)
commit01568e276f2f70f159e4415a0f2e172678aa8ac2
tree8c369aaf5a0b79b3215fb9dbd549887f223ddc01
parenta8ec4b97aa400603e5dffc429a9edf3d0540258c
[RAMEN9610-21500]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.

Change-Id: If25a862299fecfe903852d8149aad74da685b990
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/timer.c