Commit 96b61bc5 authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: omap: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.
Acked-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 656a22a1
...@@ -344,8 +344,11 @@ static int __init n810_soc_init(void) ...@@ -344,8 +344,11 @@ static int __init n810_soc_init(void)
clk_set_parent(sys_clkout2_src, func96m_clk); clk_set_parent(sys_clkout2_src, func96m_clk);
clk_set_rate(sys_clkout2, 12000000); clk_set_rate(sys_clkout2, 12000000);
BUG_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) || if (WARN_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) ||
(gpio_request(N810_SPEAKER_AMP_GPIO, "spk_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_HEADSET_AMP_GPIO, 0);
gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0); gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment