* [PATCH] thermal/drivers/airoha: put the chip-scu node on syscon lookup failure
@ 2026-11-29 8:14 Cong Nguyen
0 siblings, 0 replies; only message in thread
From: Cong Nguyen @ 2026-11-29 8:14 UTC (permalink / raw)
To: Rafael J . Wysocki, Daniel Lezcano
Cc: Zhang Rui, Lukasz Luba, linux-pm, linux-kernel
en7581_thermal_probe() takes a reference on the "airoha,chip-scu" node.
The other exits drop it with of_node_put(), but the
syscon_node_to_regmap() failure path returns without dropping it.
Drop the reference on that path as well.
Fixes: 42de37f40e1b ("thermal/drivers: Add support for Airoha EN7581 thermal sensor")
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
---
drivers/thermal/airoha_thermal.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/airoha_thermal.c b/drivers/thermal/airoha_thermal.c
index e328b6a0cf53..f41a29d560a4 100644
--- a/drivers/thermal/airoha_thermal.c
+++ b/drivers/thermal/airoha_thermal.c
@@ -572,8 +572,10 @@ static int en7581_thermal_probe(struct platform_device *pdev,
return -EINVAL;
priv->chip_scu = syscon_node_to_regmap(chip_scu_np);
- if (IS_ERR(priv->chip_scu))
+ if (IS_ERR(priv->chip_scu)) {
+ of_node_put(chip_scu_np);
return PTR_ERR(priv->chip_scu);
+ }
for (i = 0; i < AIROHA_THERMAL_FIELD_MAX; i++) {
struct regmap_field *field;
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 8:14 [PATCH] thermal/drivers/airoha: put the chip-scu node on syscon lookup failure Cong Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®