summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorMark Brown2013-11-08 11:43:41 +0100
committerMark Brown2013-11-08 11:43:41 +0100
commit108145a60675ebc0e42e7964ee6666096bbf86ce (patch)
tree19266ab0500d7bb188eb53634d484054d59473d2 /sound/soc/omap
parentMerge remote-tracking branch 'asoc/topic/twl6040' into asoc-next (diff)
parentASoC: dapm: Use WARN_ON() instead of BUG_ON() (diff)
downloadkernel-qcow2-linux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.gz
kernel-qcow2-linux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.xz
kernel-qcow2-linux-108145a60675ebc0e42e7964ee6666096bbf86ce.zip
Merge remote-tracking branch 'asoc/topic/warn' into asoc-next
Diffstat (limited to 'sound/soc/omap')
-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);