Searched hist:"87260 d3f" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/thermal/ |
H A D | rcar_thermal.c | 87260d3f Thu Apr 21 05:24:55 CDT 2016 Dirk Behme <dirk.behme@de.bosch.com> thermal: rcar_thermal: Fix priv->zone error handling
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> 87260d3f Thu Apr 21 05:24:55 CDT 2016 Dirk Behme <dirk.behme@de.bosch.com> thermal: rcar_thermal: Fix priv->zone error handling 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>
|