Skip to contentSkip to conversation

ASoC: n810: replace BUG() with BUG_ON()

PATCH Applied Alexander Beregalov 2 participants 2 messages Apr 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: n810: replace BUG() with BUG_ON()

---

 sound/soc/omap/n810.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
sound/soc/omap/n810.c +3 -4
index a6d1178..e54e1c2 100644
@@ -383,10 +383,9 @@ static int __init n810_soc_init(void)
 	clk_set_parent(sys_clkout2_src, func96m_clk);
 	clk_set_rate(sys_clkout2, 12000000);
 
-	if (gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0)
-		BUG();
-	if (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0)
-		BUG();
+	BUG_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) ||
+	       (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0));
+
 	gpio_direction_output(N810_HEADSET_AMP_GPIO, 0);
 	gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);