Skip to content

Commit

Permalink
thermal: rcar: Make error and remove paths symmetrical with init
Browse files Browse the repository at this point in the history
Swap interrupt disable and thermal zone unregistration in the error and
remove paths, to make them more symmetrical with the initialization
path.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Geert Uytterhoeven authored and Eduardo Valentin committed Feb 24, 2015
1 parent 0b37a83 commit ac71c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/rcar_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ static int rcar_thermal_probe(struct platform_device *pdev)

error_unregister:
rcar_thermal_for_each_priv(priv, common) {
thermal_zone_device_unregister(priv->zone);
if (rcar_has_irq_support(priv))
rcar_thermal_irq_disable(priv);
thermal_zone_device_unregister(priv->zone);
}

pm_runtime_put(dev);
Expand All @@ -481,9 +481,9 @@ static int rcar_thermal_remove(struct platform_device *pdev)
struct rcar_thermal_priv *priv;

rcar_thermal_for_each_priv(priv, common) {
thermal_zone_device_unregister(priv->zone);
if (rcar_has_irq_support(priv))
rcar_thermal_irq_disable(priv);
thermal_zone_device_unregister(priv->zone);
}

pm_runtime_put(dev);
Expand Down

0 comments on commit ac71c70

Please sign in to comment.