From: "yukuai (C)" <yukuai3@huawei.com>
To: Mark Brown <broonie@kernel.org>
Cc: <timur@kernel.org>, <nicoleotsuka@gmail.com>,
<Xiubo.Lee@gmail.com>, <festevam@gmail.com>,
<shengjiu.wang@gmail.com>, <lgirdwood@gmail.com>,
<perex@perex.cz>, <tiwai@suse.com>, <shawnguo@kernel.org>,
<s.hauer@pengutronix.de>, <kernel@pengutronix.de>,
<linux-imx@nxp.com>, <xobs@kosagi.com>,
<alsa-devel@alsa-project.org>, <linuxppc-dev@lists.ozlabs.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <yukuai@huawei.com>,
<yi.zhang@huawei.com>
Subject: Re: [PATCH 1/2] ASoC: fsl: imx-es8328: add missing kfree() call in imx_es8328_probe()
Date: Tue, 25 Aug 2020 20:57:13 +0800 [thread overview]
Message-ID: <4b0147df-b773-6c04-ff08-0bbc8b668f5f@huawei.com> (raw)
In-Reply-To: <20200825121102.GF5379@sirena.org.uk>
On 2020/08/25 20:11, Mark Brown wrote:
> On Tue, Aug 25, 2020 at 08:05:30PM +0800, Yu Kuai wrote:
>> If memory allocation for 'data' or 'comp' succeed, imx_es8328_probe()
>> doesn't have corresponding kfree() in exception handling. Thus add
>> kfree() for this function implementation.
>
>> @@ -151,7 +151,7 @@ static int imx_es8328_probe(struct platform_device *pdev)
>> comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL);
>> if (!comp) {
>
> The allocation is being done using devm_ which means no explicit kfree()
> is needed, the allocation will be automatically unwound when the device
> is unbound.
Hi,
Thanks for pointing it out, I'll remove this patch.
Best regards,
Yu Kuai
next prev parent reply other threads:[~2020-08-25 12:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 12:05 [PATCH 0/2] do exception handling appropriately " Yu Kuai
2020-08-25 12:05 ` [PATCH 1/2] ASoC: fsl: imx-es8328: add missing kfree() call " Yu Kuai
2020-08-25 12:11 ` Mark Brown
2020-08-25 12:57 ` yukuai (C) [this message]
2020-08-25 12:05 ` [PATCH 2/2] ASoC: fsl: imx-es8328: add missing put_device() " Yu Kuai
2020-08-27 9:17 ` Marco Felsch
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=4b0147df-b773-6c04-ff08-0bbc8b668f5f@huawei.com \
--to=yukuai3@huawei.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@gmail.com \
--cc=timur@kernel.org \
--cc=tiwai@suse.com \
--cc=xobs@kosagi.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai@huawei.com \
/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®