From: Lukasz Luba <lukasz.luba@arm.com>
To: Gopi Krishna Menon <krishnagopi487@gmail.com>,
rafael@kernel.org, daniel.lezcano@kernel.org,
rui.zhang@intel.com
Cc: daniel.baluta@nxp.com, simona.toaca@nxp.com, d-gole@ti.com,
m-chawdhry@ti.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal: fix error condition for reading st,thermal-flags
Date: Thu, 26 Mar 2026 09:06:44 +0000 [thread overview]
Message-ID: <5951fb9e-cc57-47b1-8274-dea7b84c522c@arm.com> (raw)
In-Reply-To: <20260325081844.13829-1-krishnagopi487@gmail.com>
On 3/25/26 08:18, Gopi Krishna Menon wrote:
> of_property_read_u32 returns 0 on success. The current check returns
> -EINVAL if the property is read successfully.
>
> Fix the check by removing ! from of_property_read_u32
>
> Suggested-by: Daniel Baluta <daniel.baluta@nxp.com>
> Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com>
> ---
> Note:
> * This patch is part of the GSoC2026 application process for device tree bindings conversions
> * https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings
> * Changes have only been compile tested
>
> drivers/thermal/spear_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
> index 603dadcd3df5..5e3e9c1f32f8 100644
> --- a/drivers/thermal/spear_thermal.c
> +++ b/drivers/thermal/spear_thermal.c
> @@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev)
> struct device_node *np = pdev->dev.of_node;
> int ret = 0, val;
>
> - if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> + if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
> dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
> return -EINVAL;
> }
Good catch. It deserves the fixes tag, please find the commit
which introduced that. With adding that fixes info, feel free to
add:
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
prev parent reply other threads:[~2026-03-26 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 8:18 [PATCH] thermal: fix error condition for reading st,thermal-flags Gopi Krishna Menon
2026-03-26 9:06 ` Lukasz Luba [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=5951fb9e-cc57-47b1-8274-dea7b84c522c@arm.com \
--to=lukasz.luba@arm.com \
--cc=d-gole@ti.com \
--cc=daniel.baluta@nxp.com \
--cc=daniel.lezcano@kernel.org \
--cc=krishnagopi487@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m-chawdhry@ti.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=simona.toaca@nxp.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