android_kernel_xiaomi_sm8350/sound
Jean Delvare d280289e79 sound: ASoC: Fix an error path in neo1973_wm8753
The error handling in neo1973_init is incorrect:

* If platform_device_add fails, we go on with the rest of the
  initialization instead of bailing out. Things will break when the
  module is removed (platform_device_unregister called on a device
  that wasn't registered.)

* If i2c_add_driver fails, we return an error so the module will not
  load, but we don't unregister neo1973_snd_device, so we are leaking
  resources.

Add the missing error handling.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Tim Niemeyer <reddog@mastersword.de>
Cc: Graeme Gregory <graeme@openmoko.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 09:11:07 +02:00
..
aoa ALSA: aoa - Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bits 2008-08-25 09:57:14 +02:00
arm ALSA: aaci - Fix NULL test at error path 2008-09-04 10:33:53 +02:00
core ALSA: add dummy function to support shared mmap in nommu Blackfin arch 2008-09-04 11:06:34 +02:00
drivers ALSA: dummy driver - do not use assignment in if condition 2008-08-15 12:59:02 +02:00
i2c ALSA: revo51: add headphone output 2008-08-25 09:57:17 +02:00
isa ALSA: remove stale files 2008-09-09 09:10:52 +02:00
mips ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
oss sound: remove reference to dead sound OSS vars AEDSP16_MSS and SBPRO 2008-09-09 09:11:01 +02:00
parisc ALSA: harmony - fix a typo 2008-09-04 10:33:55 +02:00
pci ALSA: hda - allow probing of 4 codecs 2008-09-09 09:10:49 +02:00
pcmcia ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
ppc ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
sh ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
soc sound: ASoC: Fix an error path in neo1973_wm8753 2008-09-09 09:11:07 +02:00
sparc ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
spi sound: Convert to menuconfig 2008-05-27 15:56:20 +02:00
synth ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
usb ALSA: us122l - Add missing dependency on CONFIG_SND_HWDEP 2008-09-09 09:10:57 +02:00
ac97_bus.c
Kconfig sound: make OSS sound core optional 2008-08-29 10:06:21 +02:00
last.c
Makefile
sound_core.c sound: make OSS sound core optional 2008-08-29 10:06:21 +02:00
sound_firmware.c