diff options
author | Yury Umanets <umka@namesys.com> | 2004-06-17 18:07:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 18:07:15 -0700 |
commit | b1b28dddbbebc5222836f81d88192634c9973be6 (patch) | |
tree | 07b1edcf8c995aa92395c244fb5315530abef3da /sound | |
parent | 37102bd0cfb8f8407f8d0ea0a0c503c2621515a7 (diff) | |
download | history-b1b28dddbbebc5222836f81d88192634c9973be6.tar.gz |
[PATCH] memory allocation checks in cs46xx_dsp_proc_register_scb_desc()
Adds memory allocation checks in cs46xx_dsp_proc_register_scb_desc()
Signed-off-by: Yury Umanets <torque@ukrpost.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/cs46xx/dsp_spos_scb_lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index 3100d003d4c773..c02a9497c28277 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -246,6 +246,12 @@ void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * sc if ((entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, ins->proc_dsp_dir)) != NULL) { scb_info = kmalloc(sizeof(proc_scb_info_t), GFP_KERNEL); + if (!scb_info) { + snd_info_free_entry(entry); + entry = NULL; + goto out; + } + scb_info->chip = chip; scb_info->scb_desc = scb; @@ -262,7 +268,7 @@ void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * sc entry = NULL; } } - +out: scb->proc_info = entry; } } |