[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 <tiwai@suse.de>
This commit is contained in:
committed by
Jaroslav Kysela
parent
f01cc521a2
commit
7c22f1aaa2
@@ -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;
|
||||
|
Reference in New Issue
Block a user