mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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:
parent
4ead0a2b6b
commit
308975fa7a
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue