[PATCH -next] thermal: rcar: fix missing unlock on error in rcar_thermal_update_temp()

Wei Yongjun weiyj.lk at gmail.com
Fri Feb 22 15:50:42 EST 2013


From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Add the missing unlock before return from function rcar_thermal_update_temp()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
 drivers/thermal/rcar_thermal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 909bb4b..fe694be 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -174,6 +174,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv)
 
 	if (!ctemp) {
 		dev_err(dev, "thermal sensor was broken\n");
+		mutex_unlock(&priv->lock);
 		return -EINVAL;
 	}
 




More information about the devicetree-discuss mailing list