X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=sound%2Fi2c%2Fi2c.c;h=5c0c77dd01c30f8a0a584dac38bb13fecd8edc59;hb=b225ee5bed70254a100896c473e6dd8c2be45c18;hp=1e58a963b2a74b60a64bd3cdcf3ba10ad6f9fb1a;hpb=5cae826e9e54a31f06b4c11b73f4af29e2ea4932;p=cascardo%2Flinux.git diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c index 1e58a963b2a7..5c0c77dd01c3 100644 --- a/sound/i2c/i2c.c +++ b/sound/i2c/i2c.c @@ -20,7 +20,6 @@ * */ -#include #include #include #include @@ -50,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); @@ -114,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;