aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/init.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-10 05:46:31 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:17:42 -0500
commit7c22f1aaa23370bf9ba2dd3abbccbed70dced216 (patch)
treeebc9c1e5cfdab4815afdfab1ba583e6220287252 /sound/core/init.c
parentf01cc521a2abef5dba24fb0873b9626ba6b0a0a5 (diff)
[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>
Diffstat (limited to 'sound/core/init.c')
-rw-r--r--sound/core/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 41e224986f35..b98f7c6310c5 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -420,7 +420,7 @@ int snd_card_register(snd_card_t * card)
420 int err; 420 int err;
421 snd_info_entry_t *entry; 421 snd_info_entry_t *entry;
422 422
423 snd_runtime_check(card != NULL, return -EINVAL); 423 snd_assert(card != NULL, return -EINVAL);
424 if ((err = snd_device_register_all(card)) < 0) 424 if ((err = snd_device_register_all(card)) < 0)
425 return err; 425 return err;
426 write_lock(&snd_card_rwlock); 426 write_lock(&snd_card_rwlock);
@@ -524,7 +524,8 @@ int __init snd_card_info_init(void)
524 snd_info_entry_t *entry; 524 snd_info_entry_t *entry;
525 525
526 entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL); 526 entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
527 snd_runtime_check(entry != NULL, return -ENOMEM); 527 if (! entry)
528 return -ENOMEM;
528 entry->c.text.read_size = PAGE_SIZE; 529 entry->c.text.read_size = PAGE_SIZE;
529 entry->c.text.read = snd_card_info_read; 530 entry->c.text.read = snd_card_info_read;
530 if (snd_info_register(entry) < 0) { 531 if (snd_info_register(entry) < 0) {