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

Commit 622207dc authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

ALSA: Kill snd_assert() in sound/isa/*



Kill snd_assert() in sound/isa/*, either removed or replaced with
if () with snd_BUG_ON().

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 7eaa943c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -394,7 +394,8 @@ static int snd_ad1816a_timer_open(struct snd_timer *timer)

static unsigned long snd_ad1816a_timer_resolution(struct snd_timer *timer)
{
	snd_assert(timer != NULL, return 0);
	if (snd_BUG_ON(!timer))
		return 0;

	return 10000;
}
@@ -961,7 +962,8 @@ int __devinit snd_ad1816a_mixer(struct snd_ad1816a *chip)
	unsigned int idx;
	int err;

	snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
	if (snd_BUG_ON(!chip || !chip->card))
		return -EINVAL;

	card = chip->card;

+2 −1
Original line number Diff line number Diff line
@@ -967,7 +967,8 @@ int snd_cs4236_mixer(struct snd_wss *chip)
	int err;
	struct snd_kcontrol_new *kcontrol;

	snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
	if (snd_BUG_ON(!chip || !chip->card))
		return -EINVAL;
	card = chip->card;
	strcpy(card->mixername, snd_wss_chip_id(chip));

+2 −1
Original line number Diff line number Diff line
@@ -1009,7 +1009,8 @@ int snd_es1688_mixer(struct snd_es1688 *chip)
	int err;
	unsigned char reg, val;

	snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
	if (snd_BUG_ON(!chip || !chip->card))
		return -EINVAL;

	card = chip->card;

+4 −2
Original line number Diff line number Diff line
@@ -276,9 +276,11 @@ static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
	static unsigned char dmas[8] =
		{6, 1, 0, 2, 0, 3, 4, 5};

	snd_assert(gus != NULL, return -EINVAL);
	if (snd_BUG_ON(!gus))
		return -EINVAL;
	card = gus->card;
	snd_assert(card != NULL, return -EINVAL);
	if (snd_BUG_ON(!card))
		return -EINVAL;

	gus->mix_cntrl_reg &= 0xf8;
	gus->mix_cntrl_reg |= 0x01;	/* disable MIC, LINE IN, enable LINE OUT */
+4 −2
Original line number Diff line number Diff line
@@ -161,9 +161,11 @@ int snd_gf1_new_mixer(struct snd_gus_card * gus)
	unsigned int idx, max;
	int err;

	snd_assert(gus != NULL, return -EINVAL);
	if (snd_BUG_ON(!gus))
		return -EINVAL;
	card = gus->card;
	snd_assert(card != NULL, return -EINVAL);
	if (snd_BUG_ON(!card))
		return -EINVAL;

	if (gus->ics_flag)
		snd_component_add(card, "ICS2101");
Loading