pandora: update defconfig
[pandora-kernel.git] / sound / core / seq / seq_ports.c
index 1c32a53..3bf7d73 100644 (file)
@@ -130,7 +130,8 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
        int num = -1;
        
        /* sanity check */
-       snd_assert(client, return NULL);
+       if (snd_BUG_ON(!client))
+               return NULL;
 
        if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
                snd_printk(KERN_WARNING "too many ports for client %d\n", client->number);
@@ -268,8 +269,8 @@ static int port_delete(struct snd_seq_client *client,
        if (port->private_free)
                port->private_free(port->private_data);
 
-       snd_assert(port->c_src.count == 0,);
-       snd_assert(port->c_dest.count == 0,);
+       snd_BUG_ON(port->c_src.count != 0);
+       snd_BUG_ON(port->c_dest.count != 0);
 
        kfree(port);
        return 0;
@@ -336,7 +337,8 @@ int snd_seq_delete_all_ports(struct snd_seq_client *client)
 int snd_seq_set_port_info(struct snd_seq_client_port * port,
                          struct snd_seq_port_info * info)
 {
-       snd_assert(port && info, return -EINVAL);
+       if (snd_BUG_ON(!port || !info))
+               return -EINVAL;
 
        /* set port name */
        if (info->name[0])
@@ -365,7 +367,8 @@ int snd_seq_set_port_info(struct snd_seq_client_port * port,
 int snd_seq_get_port_info(struct snd_seq_client_port * port,
                          struct snd_seq_port_info * info)
 {
-       snd_assert(port && info, return -EINVAL);
+       if (snd_BUG_ON(!port || !info))
+               return -EINVAL;
 
        /* get port name */
        strlcpy(info->name, port->name, sizeof(info->name));