summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-05 18:40:02 +0100
committerMark Brown <broonie@linaro.org>2013-11-07 20:55:15 +0100
commit96b61bc546519ae90317980294c161c86bcd140e (patch)
tree7e42af9caf7feffb0d74ae7fae740947b48b9321 /sound
parentASoC: mid-x86: Use WARN_ON() instead of BUG_ON() (diff)
downloadlinux-96b61bc546519ae90317980294c161c86bcd140e.tar.xz
linux-96b61bc546519ae90317980294c161c86bcd140e.zip
ASoC: omap: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly. Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/n810.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 5e8d640d314f..6d216cb6c19b 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -344,8 +344,11 @@ static int __init n810_soc_init(void)
clk_set_parent(sys_clkout2_src, func96m_clk);
clk_set_rate(sys_clkout2, 12000000);
- BUG_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) ||
- (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0));
+ if (WARN_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) ||
+ (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0))) {
+ err = -EINVAL;
+ goto err4;
+ }
gpio_direction_output(N810_HEADSET_AMP_GPIO, 0);
gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);