From: Takashi Iwai <tiwai@suse.de>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Andrew Veliath <andrewtv@usa.net>,
kernel-janitors@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound/oss/msnd_pinnacle.c: add vfrees
Date: Tue, 10 Apr 2012 08:42:55 +0200 [thread overview]
Message-ID: <s5hpqbgulxs.wl%tiwai@suse.de> (raw)
In-Reply-To: <1333959392-18933-1-git-send-email-Julia.Lawall@lip6.fr>
At Mon, 9 Apr 2012 10:16:32 +0200,
Julia Lawall wrote:
>
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> At the point of this error-handling code, HAVE_DSPCODEH may be undefined,
> so free INITCODE and PERMCODE as done elsewhere. A jump and label are
> introduced to avoid code duplication.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Thanks, applied now.
Takashi
>
> ---
> sound/oss/msnd_pinnacle.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
> index 2c79d60..536c4c0 100644
> --- a/sound/oss/msnd_pinnacle.c
> +++ b/sound/oss/msnd_pinnacle.c
> @@ -1294,6 +1294,8 @@ static int __init calibrate_adc(WORD srate)
>
> static int upload_dsp_code(void)
> {
> + int ret = 0;
> +
> msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS);
> #ifndef HAVE_DSPCODEH
> INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE);
> @@ -1312,7 +1314,8 @@ static int upload_dsp_code(void)
> memcpy_toio(dev.base, PERMCODE, PERMCODESIZE);
> if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) {
> printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n");
> - return -ENODEV;
> + ret = -ENODEV;
> + goto out;
> }
> #ifdef HAVE_DSPCODEH
> printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n");
> @@ -1320,12 +1323,13 @@ static int upload_dsp_code(void)
> printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n");
> #endif
>
> +out:
> #ifndef HAVE_DSPCODEH
> vfree(INITCODE);
> vfree(PERMCODE);
> #endif
>
> - return 0;
> + return ret;
> }
>
> #ifdef MSND_CLASSIC
>
prev parent reply other threads:[~2012-04-10 6:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 8:16 Julia Lawall
2012-04-10 6:42 ` 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=s5hpqbgulxs.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=Julia.Lawall@lip6.fr \
--cc=alsa-devel@alsa-project.org \
--cc=andrewtv@usa.net \
--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®