From: Geert Uytterhoeven Date: Mon, 23 Feb 2015 15:37:25 +0000 (+0100) Subject: thermal: rcar: Make error and remove paths symmetrical with init X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ac71c7025ebc1ed25114b1be77dc60b7f8cb8544;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git thermal: rcar: Make error and remove paths symmetrical with init 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 Acked-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin --- diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 3c2c1720ba4a..fe4e767018c4 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -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); @@ -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);