* [PATCH] base: firmware_class, fix lock imbalance
@ 2009-06-21 21:57 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-06-21 21:57 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Jiri Slaby
Add omitted unlock in firmware_data_read.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
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 ddeb819..2da4803 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;
--
1.6.3.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-21 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-21 21:57 [PATCH] base: firmware_class, fix lock imbalance Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®