From: Tzung-Bi Shih <tzungbi@kernel•org>
To: Miaoqian Lin <linmq006@gmail•com>
Cc: Liam Girdwood <lgirdwood@gmail•com>,
Mark Brown <broonie@kernel•org>, Jaroslav Kysela <perex@perex•cz>,
Takashi Iwai <tiwai@suse•com>,
Matthias Brugger <matthias.bgg@gmail•com>,
Jiaxin Yu <jiaxin.yu@mediatek•com>,
alsa-devel@alsa-project•org,
linux-arm-kernel@lists•infradead.org,
linux-mediatek@lists•infradead.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH] ASoC: mediatek: mt8192-mt6359: Fix error handling in mt8192_mt6359_dev_probe
Date: Tue, 8 Mar 2022 10:07:12 +0800 [thread overview]
Message-ID: <Yia6UG1fMZGSYzcs@google.com> (raw)
In-Reply-To: <20220308015224.23585-1-linmq006@gmail.com>
On Tue, Mar 08, 2022 at 01:52:22AM +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
>
> This function only calls of_node_put() in the regular path.
> And it will cause refcount leak in error paths.
> Fix this by calling of_node_put() in error handling too.
>
> Fixes: 4e28491a7a19 ("ASoC: mediatek: mt8192-mt6359: fix device_node leak")
> Signed-off-by: Miaoqian Lin <linmq006@gmail•com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel•org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-03-08 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 1:52 [PATCH] ASoC: mediatek: mt8192-mt6359: Fix error handling in mt8192_mt6359_dev_probe Miaoqian Lin
2022-03-08 2:07 ` Tzung-Bi Shih [this message]
2022-03-08 17:21 ` 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=Yia6UG1fMZGSYzcs@google.com \
--to=tzungbi@kernel$(echo .)org \
--cc=alsa-devel@alsa-project$(echo .)org \
--cc=broonie@kernel$(echo .)org \
--cc=jiaxin.yu@mediatek$(echo .)com \
--cc=lgirdwood@gmail$(echo .)com \
--cc=linmq006@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=perex@perex$(echo .)cz \
--cc=tiwai@suse$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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