Firmware: firmware_class, fix lock imbalance
authorJiri Slaby <jirislaby@gmail.com>
Sun, 21 Jun 2009 21:57:31 +0000 (23:57 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 12 Jul 2009 20:02:10 +0000 (13:02 -0700)
Add omitted unlock in firmware_data_read.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/firmware_class.c

index fc466531260e9a3fcdf82d7a5a323f8dd949e6de..f285f441fab9d20dbf050d61e4360759b0fbe1fb 100644 (file)
@@ -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;