ALSA: emu10k1: add error handling for snd_ctl_add
authorZhouyang Jia <jiazhouyang09@gmail.com>
Mon, 11 Jun 2018 08:18:40 +0000 (16:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:22 +0000 (07:50 +0200)
commit40ff9a54dd9b7d587abb398e40147e9237eec5e3
tree2b58ae83624d3c4e9fec1711b4446a4129536f7e
parent44a78f7d175792dbd376cbe77ce1abc3f82e5400
ALSA: emu10k1: add error handling for snd_ctl_add

[ Upstream commit 6d531e7b972cb62ded011c2dfcc2d9f72ea6c421 ]

When snd_ctl_add fails, the lack of error-handling code may
cause unexpected results.

This patch adds error-handling code after calling snd_ctl_add.

Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/emu10k1/emupcm.c