projects/linux·commit 2d8620cb

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

2d8620cb · Linus Torvalds <[email protected]> · 2009-03-19 14:50:15 -07:00

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: fix waitqueue usage in hiddev
  HID: fix incorrect free in hiddev
Commit
2d8620cb880c796c9a9b59fe8d4ff37d726acfea
Parents
fe2fd6cc · 96fe2ab8

Merge commit. Changes below are compared with the first parent: fe2fd6cc.

Changes

1 files changed · +2 −2

FileStatusAddDelContent
drivers/hid/usbhid/hiddev.cmodified+2−2View file

drivers/hid/usbhid/hiddev.c

View file
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 4940e4d..1f5b5d4 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -306,7 +306,7 @@ static int hiddev_open(struct inode *inode, struct file *file)
return 0;
bail:
file->private_data = NULL;
- kfree(list->hiddev);
+ kfree(list);
return res;
}
@@ -323,7 +323,7 @@ static ssize_t hiddev_write(struct file * file, const char __user * buffer, size
*/
static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t count, loff_t *ppos)
{
- DECLARE_WAITQUEUE(wait, current);
+ DEFINE_WAIT(wait);
struct hiddev_list *list = file->private_data;
int event_size;
int retval;