In case thermal_zone_xxx_register() returns an error, priv->zone isn't NULL any more, but contains the error code. This is passed to thermal_zone_device_unregister(), then. This checks for priv->zone being NULL, but the error code is != NULL. So it works with the error code as a pointer. Crashing immediately. To fix this, reset priv->zone to NULL before entering rcar_gen3_thermal_remove(). Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Zhang Rui <rui.zhang@intel.com> |
||
|---|---|---|
| .. | ||
| int340x_thermal | ||
| samsung | ||
| st | ||
| tegra | ||
| ti-soc-thermal | ||
| Kconfig | ||
| Makefile | ||
| armada_thermal.c | ||
| clock_cooling.c | ||
| cpu_cooling.c | ||
| db8500_cpufreq_cooling.c | ||
| db8500_thermal.c | ||
| devfreq_cooling.c | ||
| dove_thermal.c | ||
| fair_share.c | ||
| gov_bang_bang.c | ||
| hisi_thermal.c | ||
| imx_thermal.c | ||
| intel_pch_thermal.c | ||
| intel_powerclamp.c | ||
| intel_quark_dts_thermal.c | ||
| intel_soc_dts_iosf.c | ||
| intel_soc_dts_iosf.h | ||
| intel_soc_dts_thermal.c | ||
| kirkwood_thermal.c | ||
| mtk_thermal.c | ||
| of-thermal.c | ||
| power_allocator.c | ||
| qcom-spmi-temp-alarm.c | ||
| rcar_thermal.c | ||
| rockchip_thermal.c | ||
| spear_thermal.c | ||
| step_wise.c | ||
| tango_thermal.c | ||
| thermal-generic-adc.c | ||
| thermal_core.c | ||
| thermal_core.h | ||
| thermal_hwmon.c | ||
| thermal_hwmon.h | ||
| user_space.c | ||
| x86_pkg_temp_thermal.c | ||