mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Christophe JAILLET" <christophe.jaillet@wanadoo.fr>
Cc: <perex@perex.cz>, <alsa-devel@alsa-project.org>,
	<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: sparc: Add missing kfree in error path
Date: Fri, 17 Jul 2015 22:30:29 +0200	[thread overview]
Message-ID: <s5hegk634t6.wl-tiwai@suse.de> (raw)
In-Reply-To: <1437158001-29890-1-git-send-email-christophe.jaillet@wanadoo.fr>

On Fri, 17 Jul 2015 20:33:21 +0200,
Christophe JAILLET wrote:
> 
> If 'of_ioremap' fails, then 'amd' should be freed, otherwise, there is a
> memory leak.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied, thanks.


Takashi

> ---
>  sound/sparc/amd7930.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
> index 1b1a89e..784ceb8 100644
> --- a/sound/sparc/amd7930.c
> +++ b/sound/sparc/amd7930.c
> @@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card,
>  	if (!amd->regs) {
>  		snd_printk(KERN_ERR
>  			   "amd7930-%d: Unable to map chip registers.\n", dev);
> +		kfree(amd);
>  		return -EIO;
>  	}
>  
> -- 
> 2.1.4
> 
> 

      reply	other threads:[~2015-07-17 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 18:33 Christophe JAILLET
2015-07-17 20:30 ` Takashi Iwai [this message]

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=s5hegk634t6.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /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

all inboxes | Powered by JetHome®