diff options
| author | Dirk Behme <[email protected]> | 2016-04-21 10:24:55 +0000 |
|---|---|---|
| committer | Zhang Rui <[email protected]> | 2016-09-06 12:46:06 +0000 |
| commit | 87260d3f7aecba9a5fadc6886c338b2a8fccfca9 (patch) | |
| tree | 8e5a28672e5db63939e28d2a65b84b8beecd9f26 /drivers/clocksource/timer-atmel-pit.c | |
| parent | Linux 4.8-rc5 (diff) | |
| download | kernel-87260d3f7aecba9a5fadc6886c338b2a8fccfca9.tar.gz kernel-87260d3f7aecba9a5fadc6886c338b2a8fccfca9.zip | |
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 <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Diffstat (limited to 'drivers/clocksource/timer-atmel-pit.c')
0 files changed, 0 insertions, 0 deletions
