diff options
| -rw-r--r-- | drivers/thermal/rcar_thermal.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 28f091994013..04a5566b1723 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c | |||
| @@ -145,6 +145,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) | |||
| 145 | struct device *dev = rcar_priv_to_dev(priv); | 145 | struct device *dev = rcar_priv_to_dev(priv); |
| 146 | int i; | 146 | int i; |
| 147 | int ctemp, old, new; | 147 | int ctemp, old, new; |
| 148 | int ret = -EINVAL; | ||
| 148 | 149 | ||
| 149 | mutex_lock(&priv->lock); | 150 | mutex_lock(&priv->lock); |
| 150 | 151 | ||
| @@ -174,7 +175,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) | |||
| 174 | 175 | ||
| 175 | if (!ctemp) { | 176 | if (!ctemp) { |
| 176 | dev_err(dev, "thermal sensor was broken\n"); | 177 | dev_err(dev, "thermal sensor was broken\n"); |
| 177 | return -EINVAL; | 178 | goto err_out_unlock; |
| 178 | } | 179 | } |
| 179 | 180 | ||
| 180 | /* | 181 | /* |
| @@ -192,10 +193,10 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) | |||
| 192 | dev_dbg(dev, "thermal%d %d -> %d\n", priv->id, priv->ctemp, ctemp); | 193 | dev_dbg(dev, "thermal%d %d -> %d\n", priv->id, priv->ctemp, ctemp); |
| 193 | 194 | ||
| 194 | priv->ctemp = ctemp; | 195 | priv->ctemp = ctemp; |
| 195 | 196 | ret = 0; | |
| 197 | err_out_unlock: | ||
| 196 | mutex_unlock(&priv->lock); | 198 | mutex_unlock(&priv->lock); |
| 197 | 199 | return ret; | |
| 198 | return 0; | ||
| 199 | } | 200 | } |
| 200 | 201 | ||
| 201 | static int rcar_thermal_get_temp(struct thermal_zone_device *zone, | 202 | static int rcar_thermal_get_temp(struct thermal_zone_device *zone, |
