projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d011cc
)
ALSA: echoaudio: check kmalloc() result
author
Kulikov Vasiliy
<segooon@gmail.com>
Fri, 16 Jul 2010 16:15:43 +0000
(20:15 +0400)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 19 Jul 2010 15:59:04 +0000
(17:59 +0200)
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>
sound/pci/echoaudio/echoaudio.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/echoaudio/echoaudio.c
b/sound/pci/echoaudio/echoaudio.c
index 668a5ec044992f227f0f7cf37a61325ea5078549..20763dd03fa010f41e6bcd236cb296df02ca8b3b 100644
(file)
--- 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));