diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-06-21 23:57:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-12 13:02:10 -0700 |
commit | 308975fa7ab2a8e0b91186158128668c823790ce (patch) | |
tree | 4998a1a0213172b682168325e0d2a3a5ed797845 | |
parent | 4ead0a2b6b3aa0b527871ec978c3ef12aafb6bfb (diff) | |
download | linux-308975fa7ab2a8e0b91186158128668c823790ce.tar.gz linux-308975fa7ab2a8e0b91186158128668c823790ce.tar.bz2 linux-308975fa7ab2a8e0b91186158128668c823790ce.zip |
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>
-rw-r--r-- | drivers/base/firmware_class.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index fc466531260e..f285f441fab9 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -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; |