diff options
Diffstat (limited to 'drivers/base')
-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, | |||
217 | ret_count = -ENODEV; | 217 | ret_count = -ENODEV; |
218 | goto out; | 218 | goto out; |
219 | } | 219 | } |
220 | if (offset > fw->size) | 220 | if (offset > fw->size) { |
221 | return 0; | 221 | ret_count = 0; |
222 | goto out; | ||
223 | } | ||
222 | if (count > fw->size - offset) | 224 | if (count > fw->size - offset) |
223 | count = fw->size - offset; | 225 | count = fw->size - offset; |
224 | 226 | ||