perf tools: Fix build error on read only source.
[sfrench/cifs-2.6.git] / sound / synth / emux / emux.c
index c89d2ea594b9f5dbd36d94c04e2e8fdacc5571bb..f16a3fce45975a30c18975519283c92695d44c15 100644 (file)
@@ -93,10 +93,10 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch
        int err;
        struct snd_sf_callback sf_cb;
 
-       snd_assert(emu->hw != NULL, return -EINVAL);
-       snd_assert(emu->max_voices > 0, return -EINVAL);
-       snd_assert(card != NULL, return -EINVAL);
-       snd_assert(name != NULL, return -EINVAL);
+       if (snd_BUG_ON(!emu->hw || emu->max_voices <= 0))
+               return -EINVAL;
+       if (snd_BUG_ON(!card || !name))
+               return -EINVAL;
 
        emu->card = card;
        emu->name = kstrdup(name, GFP_KERNEL);