aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/wavefront
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:11:45 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:36 -0400
commit622207dc31895b4e82c39100db8635d885c795e2 (patch)
treecbfd03ebe9caa2564924c76f2ca28bc348a68c87 /sound/isa/wavefront
parent7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf (diff)
ALSA: Kill snd_assert() in sound/isa/*
Kill snd_assert() in sound/isa/*, 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/isa/wavefront')
-rw-r--r--sound/isa/wavefront/wavefront_fx.c8
-rw-r--r--sound/isa/wavefront/wavefront_midi.c24
-rw-r--r--sound/isa/wavefront/wavefront_synth.c7
3 files changed, 24 insertions, 15 deletions
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
index 2efaa7f205aa..dfc449a2194e 100644
--- a/sound/isa/wavefront/wavefront_fx.c
+++ b/sound/isa/wavefront/wavefront_fx.c
@@ -180,11 +180,11 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
180 unsigned short *pd; 180 unsigned short *pd;
181 int err = 0; 181 int err = 0;
182 182
183 snd_assert(sdev->card != NULL, return -ENODEV);
184
185 card = sdev->card; 183 card = sdev->card;
186 184 if (snd_BUG_ON(!card))
187 snd_assert(card->private_data != NULL, return -ENODEV); 185 return -ENODEV;
186 if (snd_BUG_ON(!card->private_data))
187 return -ENODEV;
188 188
189 acard = card->private_data; 189 acard = card->private_data;
190 dev = &acard->wavefront; 190 dev = &acard->wavefront;
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c
index a33384a55b0f..f14a7c0b6998 100644
--- a/sound/isa/wavefront/wavefront_midi.c
+++ b/sound/isa/wavefront/wavefront_midi.c
@@ -235,8 +235,10 @@ static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream
235 snd_wavefront_midi_t *midi; 235 snd_wavefront_midi_t *midi;
236 snd_wavefront_mpu_id mpu; 236 snd_wavefront_mpu_id mpu;
237 237
238 snd_assert(substream != NULL && substream->rmidi != NULL, return -EIO); 238 if (snd_BUG_ON(!substream || !substream->rmidi))
239 snd_assert(substream->rmidi->private_data != NULL, return -EIO); 239 return -ENXIO;
240 if (snd_BUG_ON(!substream->rmidi->private_data))
241 return -ENXIO;
240 242
241 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); 243 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data);
242 244
@@ -257,8 +259,10 @@ static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substrea
257 snd_wavefront_midi_t *midi; 259 snd_wavefront_midi_t *midi;
258 snd_wavefront_mpu_id mpu; 260 snd_wavefront_mpu_id mpu;
259 261
260 snd_assert(substream != NULL && substream->rmidi != NULL, return -EIO); 262 if (snd_BUG_ON(!substream || !substream->rmidi))
261 snd_assert(substream->rmidi->private_data != NULL, return -EIO); 263 return -ENXIO;
264 if (snd_BUG_ON(!substream->rmidi->private_data))
265 return -ENXIO;
262 266
263 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); 267 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data);
264 268
@@ -279,8 +283,10 @@ static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substrea
279 snd_wavefront_midi_t *midi; 283 snd_wavefront_midi_t *midi;
280 snd_wavefront_mpu_id mpu; 284 snd_wavefront_mpu_id mpu;
281 285
282 snd_assert(substream != NULL && substream->rmidi != NULL, return -EIO); 286 if (snd_BUG_ON(!substream || !substream->rmidi))
283 snd_assert(substream->rmidi->private_data != NULL, return -EIO); 287 return -ENXIO;
288 if (snd_BUG_ON(!substream->rmidi->private_data))
289 return -ENXIO;
284 290
285 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); 291 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data);
286 292
@@ -300,8 +306,10 @@ static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substre
300 snd_wavefront_midi_t *midi; 306 snd_wavefront_midi_t *midi;
301 snd_wavefront_mpu_id mpu; 307 snd_wavefront_mpu_id mpu;
302 308
303 snd_assert(substream != NULL && substream->rmidi != NULL, return -EIO); 309 if (snd_BUG_ON(!substream || !substream->rmidi))
304 snd_assert(substream->rmidi->private_data != NULL, return -EIO); 310 return -ENXIO;
311 if (snd_BUG_ON(!substream->rmidi->private_data))
312 return -ENXIO;
305 313
306 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); 314 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data);
307 315
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c
index 0bb9b9256601..4c410820a994 100644
--- a/sound/isa/wavefront/wavefront_synth.c
+++ b/sound/isa/wavefront/wavefront_synth.c
@@ -1648,9 +1648,10 @@ snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file,
1648 1648
1649 card = (struct snd_card *) hw->card; 1649 card = (struct snd_card *) hw->card;
1650 1650
1651 snd_assert(card != NULL, return -ENODEV); 1651 if (snd_BUG_ON(!card))
1652 1652 return -ENODEV;
1653 snd_assert(card->private_data != NULL, return -ENODEV); 1653 if (snd_BUG_ON(!card->private_data))
1654 return -ENODEV;
1654 1655
1655 acard = card->private_data; 1656 acard = card->private_data;
1656 dev = &acard->wavefront; 1657 dev = &acard->wavefront;