public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>, Julia Lawall <julia@diku.dk>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 11/15] pci: echoaudio: check kmalloc() result
Date: Fri, 16 Jul 2010 21:16:50 +0200	[thread overview]
Message-ID: <20100716211650.4abb6387@Jay> (raw)
In-Reply-To: <1279296943-25187-1-git-send-email-segooon@gmail.com>

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.

  reply	other threads:[~2010-07-16 19:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 16:15 [PATCH 11/15] pci: echoaudio: check kmalloc() result Kulikov Vasiliy
2010-07-16 19:16 ` Giuliano Pochini [this message]
2010-07-19 16:00   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100716211650.4abb6387@Jay \
    --to=pochini@shiny.it \
    --cc=alsa-devel@alsa-project.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=segooon@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox