ALSA: Kill snd_assert() in other places
[pandora-kernel.git] / sound / drivers / opl3 / opl3_lib.c
index ebe4359..7805823 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);