]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/drivers/opl3/opl3_lib.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / sound / drivers / opl3 / opl3_lib.c
index ebe4359047cb2deb90fdc952ccae21d7ce555c38..780582340fefab73e11930775edc81fcda2ff9f6 100644 (file)
@@ -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);