mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +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;
|
ret_count = -ENODEV;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (offset > fw->size)
|
if (offset > fw->size) {
|
||||||
return 0;
|
ret_count = 0;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
if (count > fw->size - offset)
|
if (count > fw->size - offset)
|
||||||
count = fw->size - offset;
|
count = fw->size - offset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue