diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-16 18:15:43 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-19 17:59:04 +0200 |
commit | 0b6d092c8eeeb43893503afd2f6c1c67ceafc863 (patch) | |
tree | e69ed28a29b3f9a3499963d66fbe7dab37f03d00 | |
parent | Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc (diff) | |
download | linux-0b6d092c8eeeb43893503afd2f6c1c67ceafc863.tar.xz linux-0b6d092c8eeeb43893503afd2f6c1c67ceafc863.zip |
ALSA: echoaudio: check kmalloc() result
If kmalloc() fails exit with -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Ack-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 668a5ec04499..20763dd03fa0 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -2250,6 +2250,8 @@ static int snd_echo_resume(struct pci_dev *pci) DE_INIT(("resume start\n")); pci_restore_state(pci); commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL); + if (commpage_bak == NULL) + return -ENOMEM; commpage = chip->comm_page; memcpy(commpage_bak, commpage, sizeof(struct comm_page)); |