Skip to contentSkip to conversation

base: firmware_class, fix lock imbalance

PATCH New Jiri Slaby 1 participant 1 message Jun 21, 2009 Driver core

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 base: firmware_class, fix lock imbalance

Add omitted unlock in firmware_data_read.

---
 drivers/base/firmware_class.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/base/firmware_class.c +4 -2
index ddeb819..2da4803 100644
@@ -217,8 +217,10 @@ firmware_data_read(struct kobject *kobj, struct bin_attribute *bin_attr,
 		ret_count = -ENODEV;
 		goto out;
 	}
-	if (offset > fw->size)
-		return 0;
+	if (offset > fw->size) {
+		ret_count = 0;
+		goto out;
+	}
 	if (count > fw->size - offset)
 		count = fw->size - offset;
 
Signature · 1 line
1.6.3.2