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>
This commit is contained in:
parent
8d011cc7a9
commit
0b6d092c8e
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue