From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Fabio Estevam <festevam@gmail.com>, Timur Tabi <timur@kernel.org>,
Xiubo Li <Xiubo.Lee@gmail.com>
Subject: Re: [PATCH 1/6] ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()
Date: Tue, 19 Feb 2019 21:29:08 -0800 [thread overview]
Message-ID: <20190220052907.GA6629@Asurada-CZ80> (raw)
In-Reply-To: <20190219154652.13644-2-tiwai@suse.de>
On Tue, Feb 19, 2019 at 04:46:47PM +0100, Takashi Iwai wrote:
> The node obtained from of_find_node_by_path() has to be unreferenced
> after the use, but we forgot it for the root node.
>
> Fixes: f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support")
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
> Cc: Xiubo Li <Xiubo.Lee@gmail.com>
> Cc: Fabio Estevam <festevam@gmail.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>
> Only compile-tested. Please review carefully. Thanks!
Ran a boot test by removing the if-condition. It'd be fine.
Thank you
Nicolin
> sound/soc/fsl/fsl_ssi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 0a648229e643..09b2967befd9 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -1439,8 +1439,10 @@ static int fsl_ssi_probe_from_dt(struct fsl_ssi *ssi)
> * different name to register the device.
> */
> if (!ssi->card_name[0] && of_get_property(np, "codec-handle", NULL)) {
> - sprop = of_get_property(of_find_node_by_path("/"),
> - "compatible", NULL);
> + struct device_node *root = of_find_node_by_path("/");
> +
> + sprop = of_get_property(root, "compatible", NULL);
> + of_node_put(root);
> /* Strip "fsl," in the compatible name if applicable */
> p = strrchr(sprop, ',');
> if (p)
> --
> 2.16.4
>
next prev parent reply other threads:[~2019-02-20 9:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 15:46 [PATCH 0/6] ASoC: Fix of-node refcount unbalance Takashi Iwai
2019-02-19 15:46 ` [PATCH 1/6] ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt() Takashi Iwai
2019-02-20 5:29 ` Nicolin Chen [this message]
2019-02-20 12:13 ` Applied "ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()" to the asoc tree Mark Brown
2019-02-19 15:46 ` [PATCH 2/6] ASoC: simple-card: Fix missing of_node_put() at simple_dai_link_of() Takashi Iwai
2019-02-20 12:13 ` Applied "ASoC: simple-card: Fix missing of_node_put() at simple_dai_link_of()" to the asoc tree Mark Brown
2019-02-19 15:46 ` [PATCH 3/6] ASoC: simple-card: Fix of-node refcount unbalance in DAI-link parser Takashi Iwai
2019-02-20 12:13 ` Applied "ASoC: simple-card: Fix of-node refcount unbalance in DAI-link parser" to the asoc tree Mark Brown
2019-02-19 15:46 ` [PATCH 4/6] ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of() Takashi Iwai
2019-02-20 17:52 ` Applied "ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()" to the asoc tree Mark Brown
2019-02-19 15:46 ` [PATCH 5/6] ASoC: qcom: Fix of-node refcount unbalance in qcom_snd_parse_of() Takashi Iwai
2019-02-20 17:52 ` Applied "ASoC: qcom: Fix of-node refcount unbalance in qcom_snd_parse_of()" to the asoc tree Mark Brown
2019-02-19 15:46 ` [PATCH 6/6] ASoC: samsung: Fix of-node refcount unbalance in odroid_audio_probe() Takashi Iwai
2019-02-19 16:36 ` Sylwester Nawrocki
2019-02-20 10:40 ` Takashi Iwai
2019-02-20 11:06 ` Sylwester Nawrocki
2019-02-20 0:27 ` [PATCH 0/6] ASoC: Fix of-node refcount unbalance Kuninori Morimoto
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=20190220052907.GA6629@Asurada-CZ80 \
--to=nicoleotsuka@gmail.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=timur@kernel.org \
--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