From: Mark Brown <broonie@kernel.org>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Agrawal Akshu <Akshu.Agrawal@amd.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: amd: add missed checks for clk_get()
Date: Thu, 3 Dec 2020 14:43:56 +0000 [thread overview]
Message-ID: <20201203144356.GG4700@sirena.org.uk> (raw)
In-Reply-To: <20201203143116.405930-1-hslester96@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 496 bytes --]
On Thu, Dec 03, 2020 at 10:31:16PM +0800, Chuhong Yuan wrote:
> da7219_dai_wclk = clk_get(component->dev, "da7219-dai-wclk");
> + if (IS_ERR(da7219_dai_wclk))
> + return PTR_ERR(da7219_dai_wclk);
> +
> da7219_dai_bclk = clk_get(component->dev, "da7219-dai-bclk");
> + if (IS_ERR(da7219_dai_bclk))
> + return PTR_ERR(da7219_dai_bclk);
This is also buggy - instead of ignoring the errors (which is an issue)
we now leak the wclk if the bclk fails. Probably should convert to devm
as well.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-12-03 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 14:31 [PATCH] ASoC: amd: add missed checks for clk_get() Chuhong Yuan
2020-12-03 14:43 ` Mark Brown [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=20201203144356.GG4700@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Akshu.Agrawal@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=hslester96@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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