From: Krzysztof Kozlowski <krzk@kernel.org>
To: Binbin Zhou <zhoubb.aaron@gmail.com>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Huacai Chen <chenhuacai@kernel.org>,
devicetree@vger.kernel.org, linux-sound@vger.kernel.org,
Xuerui Wang <kernel@xen0n.name>,
loongarch@lists.linux.dev
Subject: Re: [PATCH v1 06/10] ASoC: loongson: Fix codec detection failure on FDT systems
Date: Mon, 9 Sep 2024 09:53:43 +0200 [thread overview]
Message-ID: <d31d7f30-5b6b-4d3f-85fa-62835e1e9b6c@kernel.org> (raw)
In-Reply-To: <CAMpQs4JsbodfscgQPYVz0K99mYAQzZp3pvhmHuvddsw3YWvQEA@mail.gmail.com>
On 09/09/2024 09:51, Binbin Zhou wrote:
>>
>>> + return ret;
>>> +}
>>> +
>>> +static int loongson_parse_codec(struct device *dev, struct device_node **dai_node,
>>> + const char **dai_name)
>>> +{
>>> + struct of_phandle_args args;
>>> + struct device_node *codec;
>>> + int ret = 0;
>>>
>>> codec = of_get_child_by_name(dev->of_node, "codec");
>>> - if (!codec) {
>>> - dev_err(dev, "audio-codec property missing or invalid\n");
>>> + if (!codec)
>>
>> Hm? So you exit here and then caller does of_node_put on stack value.
>> This is buggy.
>
> Sorry, I can not get your point, I think there is nothing that should be put.
You drop reference from a pointer which is a random stack value.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-09-09 7:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 7:02 [PATCH v1 00/10] ASoC: Some issues about loongson i2s Binbin Zhou
2024-09-05 7:02 ` [PATCH v1 01/10] ASoC: dt-bindings: Add Everest ES8323 Codec Binbin Zhou
2024-09-06 10:21 ` Krzysztof Kozlowski
2024-09-09 8:12 ` Binbin Zhou
2024-09-05 7:02 ` [PATCH v1 02/10] ASoC: codecs: Add support for ES8323 Binbin Zhou
2024-09-05 14:05 ` Mark Brown
2024-09-13 2:02 ` Binbin Zhou
2024-09-13 16:44 ` Mark Brown
2024-09-18 9:24 ` Binbin Zhou
2024-09-18 11:15 ` Mark Brown
2024-09-05 20:31 ` kernel test robot
2024-09-05 7:02 ` [PATCH v1 03/10] ASoC: dt-bindings: Add NXP uda1342 Codec Binbin Zhou
2024-09-06 10:22 ` Krzysztof Kozlowski
2024-09-05 7:02 ` [PATCH v1 04/10] ASoC: codecs: Add uda1342 codec driver Binbin Zhou
2024-09-05 14:28 ` Mark Brown
2024-09-10 7:36 ` Binbin Zhou
2024-09-06 2:10 ` kernel test robot
2024-09-05 7:02 ` [PATCH v1 05/10] ASoC: loongson: Improve code readability Binbin Zhou
2024-09-05 14:31 ` Mark Brown
2024-09-07 7:53 ` Binbin Zhou
2024-09-05 7:02 ` [PATCH v1 06/10] ASoC: loongson: Fix codec detection failure on FDT systems Binbin Zhou
2024-09-06 10:28 ` Krzysztof Kozlowski
2024-09-09 7:51 ` Binbin Zhou
2024-09-09 7:53 ` Krzysztof Kozlowski [this message]
2024-09-05 7:02 ` [PATCH v1 07/10] ASoC: dt-bindings: Add Loongson I2S controller Binbin Zhou
2024-09-06 10:23 ` Krzysztof Kozlowski
2024-09-07 8:26 ` Binbin Zhou
2024-09-05 7:07 ` [PATCH v1 08/10] ASoC: loongson: Add I2S controller driver as platform device Binbin Zhou
2024-09-05 14:36 ` Mark Brown
2024-09-07 8:08 ` Binbin Zhou
2024-09-07 12:14 ` Mark Brown
2024-09-06 1:08 ` kernel test robot
2024-09-06 6:18 ` kernel test robot
2024-09-06 11:37 ` Geert Uytterhoeven
2024-09-07 8:18 ` Binbin Zhou
2024-09-05 7:07 ` [PATCH v1 09/10] LoongArch: dts: Add I2S support to Loongson-2K1000 Binbin Zhou
2024-09-05 7:07 ` [PATCH v1 10/10] LoongArch: dts: Add I2S support to Loongson-2K2000 Binbin Zhou
2024-09-05 8:13 ` [PATCH v1 00/10] ASoC: Some issues about loongson i2s Krzysztof Kozlowski
2024-09-05 8:34 ` Binbin Zhou
2024-09-05 8:50 ` Krzysztof Kozlowski
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=d31d7f30-5b6b-4d3f-85fa-62835e1e9b6c@kernel.org \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@xen0n.name \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).