Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305051
b: refs/heads/master
c: d4f0e4d
h: refs/heads/master
i:
  305049: 6b69af6
  305047: 40420eb
v: v3
  • Loading branch information
Havard Skinnemoen authored and Jiri Kosina committed Apr 27, 2012
1 parent 8275275 commit a3b28bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f1f463ae5d8597fe2b4ffc73051616c47ac1924
refs/heads/master: d4f0e4daf0d867f80c78ca4f9ac03a562e229e72
9 changes: 5 additions & 4 deletions trunk/drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/hid.h>
#include <linux/hiddev.h>
#include <linux/compat.h>
#include <linux/vmalloc.h>
#include "usbhid.h"

#ifdef CONFIG_USB_DYNAMIC_MINORS
Expand Down Expand Up @@ -250,13 +251,13 @@ static int hiddev_release(struct inode * inode, struct file * file)
} else {
mutex_unlock(&list->hiddev->existancelock);
kfree(list->hiddev);
kfree(list);
vfree(list);
return 0;
}
}

mutex_unlock(&list->hiddev->existancelock);
kfree(list);
vfree(list);

return 0;
}
Expand All @@ -278,7 +279,7 @@ static int hiddev_open(struct inode *inode, struct file *file)
hid = usb_get_intfdata(intf);
hiddev = hid->hiddev;

if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL)))
if (!(list = vzalloc(sizeof(struct hiddev_list))))
return -ENOMEM;
mutex_init(&list->thread_lock);
list->hiddev = hiddev;
Expand Down Expand Up @@ -322,7 +323,7 @@ static int hiddev_open(struct inode *inode, struct file *file)
mutex_unlock(&hiddev->existancelock);
bail:
file->private_data = NULL;
kfree(list);
vfree(list);
return res;
}

Expand Down

0 comments on commit a3b28bf

Please sign in to comment.