Skip to content

Commit

Permalink
Firmware: firmware_class, fix lock imbalance
Browse files Browse the repository at this point in the history
Add omitted unlock in firmware_data_read.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jul 12, 2009
1 parent 4ead0a2 commit 308975f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 308975f

Please sign in to comment.