Firmware: firmware_class, fix lock imbalance

Add omitted unlock in firmware_data_read.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Jiri Slaby 2009-06-21 23:57:31 +02:00 committed by Greg Kroah-Hartman
parent 4ead0a2b6b
commit 308975fa7a
1 changed files with 4 additions and 2 deletions

View File

@ -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;