diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:47 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:40 -0400 |
commit | 5e246b850df563224be26f1d409cf66fd6c968df (patch) | |
tree | 970e7faf60b86cb2c489a08ca506075c398165e5 /sound/i2c/i2c.c | |
parent | da3cec35dd3c31d8706db4bf379372ce70d92118 (diff) |
ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/i2c/i2c.c')
-rw-r--r-- | sound/i2c/i2c.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c index b1e74e40cba0..5c0c77dd01c3 100644 --- a/sound/i2c/i2c.c +++ b/sound/i2c/i2c.c | |||
@@ -49,7 +49,8 @@ static int snd_i2c_bus_free(struct snd_i2c_bus *bus) | |||
49 | struct snd_i2c_bus *slave; | 49 | struct snd_i2c_bus *slave; |
50 | struct snd_i2c_device *device; | 50 | struct snd_i2c_device *device; |
51 | 51 | ||
52 | snd_assert(bus != NULL, return -EINVAL); | 52 | if (snd_BUG_ON(!bus)) |
53 | return -EINVAL; | ||
53 | while (!list_empty(&bus->devices)) { | 54 | while (!list_empty(&bus->devices)) { |
54 | device = snd_i2c_device(bus->devices.next); | 55 | device = snd_i2c_device(bus->devices.next); |
55 | snd_i2c_device_free(device); | 56 | snd_i2c_device_free(device); |
@@ -113,7 +114,8 @@ int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, | |||
113 | struct snd_i2c_device *device; | 114 | struct snd_i2c_device *device; |
114 | 115 | ||
115 | *rdevice = NULL; | 116 | *rdevice = NULL; |
116 | snd_assert(bus != NULL, return -EINVAL); | 117 | if (snd_BUG_ON(!bus)) |
118 | return -EINVAL; | ||
117 | device = kzalloc(sizeof(*device), GFP_KERNEL); | 119 | device = kzalloc(sizeof(*device), GFP_KERNEL); |
118 | if (device == NULL) | 120 | if (device == NULL) |
119 | return -ENOMEM; | 121 | return -ENOMEM; |