diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-24 15:44:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-24 15:44:59 -0400 |
commit | 7c024e9534f9edd8d052380a1b40d376c8feb11b (patch) | |
tree | 521eeb9d1eaa851e254a372bd008a07ab1f5e574 /drivers/hid/hidraw.c | |
parent | 188e213dbc5758bbfb62f7ce0367c5c8de057f02 (diff) | |
parent | d8692ac012104ebffb343c0bcb4a2b8642c821a6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (47 commits)
HID: fix mismerge in hid-lg
HID: hidraw: fix window in hidraw_release
HID: hid-sony: override usbhid_output_raw_report for Sixaxis
HID: add absolute axis resolution calculation
HID: force feedback support for Logitech RumblePad gamepad
HID: support STmicroelectronics and Sitronix with hid-stantuml driver
HID: magicmouse: Adjust major / minor axes to scale
HID: Fix for problems with eGalax/DWAV multi-touch-screen
HID: waltop: add support for Waltop Slim Tablet 12.1 inch
HID: add NOGET quirk for AXIS 295 Video Surveillance Joystick
HID: usbhid: remove unused hiddev_driver
HID: magicmouse: Use hid-input parsing rather than bypassing it
HID: trivial formatting fix
HID: Add support for Logitech Speed Force Wireless gaming wheel
HID: don't Send Feature Reports on Interrupt Endpoint
HID: 3m: Adjust major / minor axes to scale
HID: 3m: Correct touchscreen emulation
HID: 3m: Convert to MT slots
HID: 3m: Output proper orientation range
HID: 3m: Adjust to sequential MT HID protocol
...
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r-- | drivers/hid/hidraw.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 925992f549f0..8a4b32dca9f7 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -218,9 +218,13 @@ static int hidraw_release(struct inode * inode, struct file * file) | |||
218 | unsigned int minor = iminor(inode); | 218 | unsigned int minor = iminor(inode); |
219 | struct hidraw *dev; | 219 | struct hidraw *dev; |
220 | struct hidraw_list *list = file->private_data; | 220 | struct hidraw_list *list = file->private_data; |
221 | int ret; | ||
221 | 222 | ||
222 | if (!hidraw_table[minor]) | 223 | mutex_lock(&minors_lock); |
223 | return -ENODEV; | 224 | if (!hidraw_table[minor]) { |
225 | ret = -ENODEV; | ||
226 | goto unlock; | ||
227 | } | ||
224 | 228 | ||
225 | list_del(&list->node); | 229 | list_del(&list->node); |
226 | dev = hidraw_table[minor]; | 230 | dev = hidraw_table[minor]; |
@@ -233,10 +237,12 @@ static int hidraw_release(struct inode * inode, struct file * file) | |||
233 | kfree(list->hidraw); | 237 | kfree(list->hidraw); |
234 | } | 238 | } |
235 | } | 239 | } |
236 | |||
237 | kfree(list); | 240 | kfree(list); |
241 | ret = 0; | ||
242 | unlock: | ||
243 | mutex_unlock(&minors_lock); | ||
238 | 244 | ||
239 | return 0; | 245 | return ret; |
240 | } | 246 | } |
241 | 247 | ||
242 | static long hidraw_ioctl(struct file *file, unsigned int cmd, | 248 | static long hidraw_ioctl(struct file *file, unsigned int cmd, |