ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
committed by
Jaroslav Kysela
parent
da3cec35dd
commit
5e246b850d
@@ -139,7 +139,8 @@ static int snd_opl3_detect(struct snd_opl3 * opl3)
|
||||
* If we had an OPL4 chip, opl3->hardware would have been set
|
||||
* by the OPL4 driver; so we can assume OPL3 here.
|
||||
*/
|
||||
snd_assert(opl3->r_port != 0, return -ENODEV);
|
||||
if (snd_BUG_ON(!opl3->r_port))
|
||||
return -ENODEV;
|
||||
opl3->hardware = OPL3_HW_OPL3;
|
||||
}
|
||||
return 0;
|
||||
@@ -324,7 +325,8 @@ EXPORT_SYMBOL(snd_opl3_interrupt);
|
||||
|
||||
static int snd_opl3_free(struct snd_opl3 *opl3)
|
||||
{
|
||||
snd_assert(opl3 != NULL, return -ENXIO);
|
||||
if (snd_BUG_ON(!opl3))
|
||||
return -ENXIO;
|
||||
if (opl3->private_free)
|
||||
opl3->private_free(opl3);
|
||||
snd_opl3_clear_patches(opl3);
|
||||
|
Reference in New Issue
Block a user