From 7c22f1aaa23370bf9ba2dd3abbccbed70dced216 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 10 Oct 2005 11:46:31 +0200 Subject: [ALSA] Remove snd_runtime_check() macro Remove snd_runtime_check() macro. This macro worsens the readability of codes. They should be either normal if() or removable asserts. Also, the assert displays stack-dump, instead of only the last caller pointer. Signed-off-by: Takashi Iwai --- sound/core/pcm_native.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/core/pcm_native.c') diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index e97b2d1..e6e2b70 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2053,7 +2053,8 @@ static int snd_pcm_open(struct inode *inode, struct file *file) snd_pcm_file_t *pcm_file; wait_queue_t wait; - snd_runtime_check(device >= SNDRV_MINOR_PCM_PLAYBACK && device < SNDRV_MINOR_DEVICES, return -ENXIO); + if (device < SNDRV_MINOR_PCM_PLAYBACK || device >= SNDRV_MINOR_DEVICES) + return -ENXIO; pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + (device % SNDRV_MINOR_PCMS)]; if (pcm == NULL) { err = -ENODEV; -- cgit v1.1