]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/i2c/i2c.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / sound / i2c / i2c.c
index b1e74e40cba050656879dbe529a72adb218397c3..5c0c77dd01c30f8a0a584dac38bb13fecd8edc59 100644 (file)
@@ -49,7 +49,8 @@ static int snd_i2c_bus_free(struct snd_i2c_bus *bus)
        struct snd_i2c_bus *slave;
        struct snd_i2c_device *device;
 
-       snd_assert(bus != NULL, return -EINVAL);
+       if (snd_BUG_ON(!bus))
+               return -EINVAL;
        while (!list_empty(&bus->devices)) {
                device = snd_i2c_device(bus->devices.next);
                snd_i2c_device_free(device);
@@ -113,7 +114,8 @@ int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name,
        struct snd_i2c_device *device;
 
        *rdevice = NULL;
-       snd_assert(bus != NULL, return -EINVAL);
+       if (snd_BUG_ON(!bus))
+               return -EINVAL;
        device = kzalloc(sizeof(*device), GFP_KERNEL);
        if (device == NULL)
                return -ENOMEM;