Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c8d620a authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown
Browse files

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



Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 246e884b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -658,7 +658,8 @@ SOC_SINGLE_TLV("EQ5 Volume", WM8904_EQ6, 0, 24, 0, eq_tlv),
static int cp_event(struct snd_soc_dapm_widget *w,
static int cp_event(struct snd_soc_dapm_widget *w,
		    struct snd_kcontrol *kcontrol, int event)
		    struct snd_kcontrol *kcontrol, int event)
{
{
	BUG_ON(event != SND_SOC_DAPM_POST_PMU);
	if (WARN_ON(event != SND_SOC_DAPM_POST_PMU))
		return -EINVAL;


	/* Maximum startup time */
	/* Maximum startup time */
	udelay(500);
	udelay(500);