Skip to contentSkip to conversation

HWMON: max6650, fix lock imbalance

PATCH Applied Jiri Slaby 3 participants 3 messages Jun 19, 2009 – Jun 20, 2009

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 HWMON: max6650, fix lock imbalance

Add omitted update_lock to one switch/case in set_div.

---
 drivers/hwmon/max6650.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hwmon/max6650.c +1 -0
index 86142a8..58f66be 100644
@@ -418,6 +418,7 @@ static ssize_t set_div(struct device *dev, struct device_attribute *devattr,
 		data->count = 3;
 		break;
 	default:
+		mutex_unlock(&data->update_lock);
 		dev_err(&client->dev,
 			"illegal value for fan divider (%d)\n", div);
 		return -EINVAL;
Signature · 7 lines
1.6.3.2


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 1 line · Jiri Slaby

Add omitted update_lock to one switch/case in set_div.

Ahem, yes, thanks!

Quoted 2 lines
Quoted 18 lines
---
 drivers/hwmon/max6650.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hwmon/max6650.c +1 -0
index 86142a8..58f66be 100644
@@ -418,6 +418,7 @@ static ssize_t set_div(struct device *dev, struct device_attribute *devattr,
 		data->count = 3;
 		break;
 	default:
+		mutex_unlock(&data->update_lock);
 		dev_err(&client->dev,
 			"illegal value for fan divider (%d)\n", div);
 		return -EINVAL;
Signature · 1 line
1.6.3.2

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

Applied
#2 lore raw
Quoted 14 lines · Hans J. Koch
Quoted 1 line · Jiri Slaby

Add omitted update_lock to one switch/case in set_div.

Ahem, yes, thanks!

Quoted 2 lines
Quoted 4 lines
---
 drivers/hwmon/max6650.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines

drivers/hwmon/max6650.c static ssize_t set_div(struct device *dev, struct device_attribute *devattr, · line 424

Quoted 12 lines
drivers/hwmon/max6650.c +1 -0
index 86142a8..58f66be 100644
@@ -418,6 +418,7 @@ static ssize_t set_div(struct device *dev, struct device_attribute *devattr,
 		data->count = 3;
 		break;
 	default:
+		mutex_unlock(&data->update_lock);
 		dev_err(&client->dev,
 			"illegal value for fan divider (%d)\n", div);
 		return -EINVAL;

Applied, thanks.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors