* [PATCH 11/15] pci: echoaudio: check kmalloc() result
@ 2010-07-16 16:15 Kulikov Vasiliy
2010-07-16 19:16 ` Giuliano Pochini
0 siblings, 1 reply; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-07-16 16:15 UTC (permalink / raw)
To: kernel-janitors
Cc: Jaroslav Kysela, Takashi Iwai, Giuliano Pochini, Julia Lawall,
linux-kernel, alsa-devel
If kmalloc() fails exit with -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
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 668a5ec..20763dd 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));
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 11/15] pci: echoaudio: check kmalloc() result
2010-07-16 16:15 [PATCH 11/15] pci: echoaudio: check kmalloc() result Kulikov Vasiliy
@ 2010-07-16 19:16 ` Giuliano Pochini
2010-07-19 16:00 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Giuliano Pochini @ 2010-07-16 19:16 UTC (permalink / raw)
To: Kulikov Vasiliy
Cc: kernel-janitors, Jaroslav Kysela, Takashi Iwai, Julia Lawall,
linux-kernel, alsa-devel
On Fri, 16 Jul 2010 20:15:43 +0400
Kulikov Vasiliy <segooon@gmail.com> wrote:
> If kmalloc() fails exit with -ENOMEM.
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
> 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 668a5ec..20763dd 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));
>
Yes, of course. Thank you.
Ack-by: Giuliano Pochini <pochini@shiny.it>
--
Giuliano.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 11/15] pci: echoaudio: check kmalloc() result
2010-07-16 19:16 ` Giuliano Pochini
@ 2010-07-19 16:00 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2010-07-19 16:00 UTC (permalink / raw)
To: Giuliano Pochini
Cc: alsa-devel, Kulikov Vasiliy, kernel-janitors, linux-kernel,
Julia Lawall
At Fri, 16 Jul 2010 21:16:50 +0200,
Giuliano Pochini wrote:
>
> On Fri, 16 Jul 2010 20:15:43 +0400
> Kulikov Vasiliy <segooon@gmail.com> wrote:
>
> > If kmalloc() fails exit with -ENOMEM.
> >
> > Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> > ---
> > 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 668a5ec..20763dd 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));
> >
>
> Yes, of course. Thank you.
>
>
> Ack-by: Giuliano Pochini <pochini@shiny.it>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-19 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 16:15 [PATCH 11/15] pci: echoaudio: check kmalloc() result Kulikov Vasiliy
2010-07-16 19:16 ` Giuliano Pochini
2010-07-19 16:00 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).