From: Wolfram Sang <w.sang@pengutronix.de>
To: Julia Lawall <julia@diku.dk>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Dong Aisheng <b29396@freescale.com>, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH 3/4] sound/soc/mxs/mxs-saif.c: add missing kfree
Date: Sat, 20 Aug 2011 13:44:39 +0000 [thread overview]
Message-ID: <20110820134439.GA2266@pengutronix.de> (raw)
In-Reply-To: <1313820761-12042-3-git-send-email-julia@diku.dk>
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
On Sat, Aug 20, 2011 at 08:12:40AM +0200, Julia Lawall wrote:
> diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
> index 0b3adae..4a17bc8 100644
> --- a/sound/soc/mxs/mxs-saif.c
> +++ b/sound/soc/mxs/mxs-saif.c
> @@ -523,8 +523,10 @@ static int mxs_saif_probe(struct platform_device *pdev)
> if (!saif)
> return -ENOMEM;
>
> - if (pdev->id >= ARRAY_SIZE(mxs_saif))
> - return -EINVAL;
> + if (pdev->id >= ARRAY_SIZE(mxs_saif)) {
> + ret = -EINVAL;
> + goto failed;
> + }
> mxs_saif[pdev->id] = saif;
Thanks, Julia. May I suggest to simple move the id-check before the
allocation?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-08-20 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-20 6:12 [PATCH 3/4] sound/soc/mxs/mxs-saif.c: add missing kfree Julia Lawall
2011-08-20 13:44 ` Wolfram Sang [this message]
2011-08-20 15:18 ` Julia Lawall
2011-08-21 10:29 ` Dong Aisheng-B29396
2011-08-21 10:57 ` Julia Lawall
2011-08-21 11:18 ` [PATCH] " Julia Lawall
2011-08-21 11:29 ` Wolfram Sang
2011-08-21 13:40 ` Dong Aisheng-B29396
2011-08-22 10:21 ` Liam Girdwood
2011-08-22 22:35 ` Mark Brown
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=20110820134439.GA2266@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=alsa-devel@alsa-project.org \
--cc=b29396@freescale.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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