From 78f8876830a22b667585f093adf3b9c6089e9f0d Mon Sep 17 00:00:00 2001 From: Wayen Yan Date: Sun, 14 Jun 2026 22:25:37 +0800 Subject: [PATCH] thermal: airoha: fix wrong variable in AN7583 error check In an7583_thermal_probe(), the code assigns priv->chip_scu from device_node_to_regmap() but then checks IS_ERR(priv->map) and returns PTR_ERR(priv->map). The variable priv->map is not assigned in this function, so the error check uses a different variable than what was actually assigned. This should check chip_scu instead of map. Fixes: 5891a9e5fbdf ("thermal/drivers: airoha: Add support for AN7583") Signed-off-by: Wayen Yan Link: https://github.com/openwrt/openwrt/pull/23781 Signed-off-by: Jonas Jelonek --- ...402-05-thermal-drivers-airoha-Add-support-for-AN7583.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/airoha/patches-6.18/402-05-thermal-drivers-airoha-Add-support-for-AN7583.patch b/target/linux/airoha/patches-6.18/402-05-thermal-drivers-airoha-Add-support-for-AN7583.patch index 51332350ef7..dd7912259c3 100644 --- a/target/linux/airoha/patches-6.18/402-05-thermal-drivers-airoha-Add-support-for-AN7583.patch +++ b/target/linux/airoha/patches-6.18/402-05-thermal-drivers-airoha-Add-support-for-AN7583.patch @@ -231,8 +231,8 @@ Signed-off-by: Christian Marangi + int i; + + priv->chip_scu = device_node_to_regmap(dev->parent->of_node); -+ if (IS_ERR(priv->map)) -+ return PTR_ERR(priv->map); ++ if (IS_ERR(priv->chip_scu)) ++ return PTR_ERR(priv->chip_scu); + + for (i = 0; i < AIROHA_THERMAL_FIELD_MAX; i++) { + struct regmap_field *field; -- 2.47.3