summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hidraw.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-10-25 03:59:04 -0400
committerJiri Kosina <jkosina@suse.cz>2011-10-25 03:59:04 -0400
commitb3aec7b686329e6bb65aa08c7f9458f7fd512f06 (patch)
tree67ae55567b5747f32ddd76dd63621bd2ca756a88 /drivers/hid/hidraw.c
parentf6f12427844516bc8e9cf84f43aca7bbbaa48157 (diff)
parent1bcc20675a1ac1ba47eaa201e02a89b0508e17b2 (diff)
Merge branch 'upstream' into for-linus
Conflicts: drivers/hid/hid-core.c drivers/hid/hid-ids.h
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r--drivers/hid/hidraw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 6d65d4e35120..cf7d6d58e79f 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -259,7 +259,6 @@ static int hidraw_open(struct inode *inode, struct file *file)
259 259
260 mutex_lock(&minors_lock); 260 mutex_lock(&minors_lock);
261 if (!hidraw_table[minor]) { 261 if (!hidraw_table[minor]) {
262 kfree(list);
263 err = -ENODEV; 262 err = -ENODEV;
264 goto out_unlock; 263 goto out_unlock;
265 } 264 }
@@ -287,6 +286,8 @@ static int hidraw_open(struct inode *inode, struct file *file)
287out_unlock: 286out_unlock:
288 mutex_unlock(&minors_lock); 287 mutex_unlock(&minors_lock);
289out: 288out:
289 if (err < 0)
290 kfree(list);
290 return err; 291 return err;
291 292
292} 293}