diff options
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r-- | drivers/hid/hidraw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index cb0137b3718d..ab24ce2eb28f 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -320,13 +320,13 @@ static void drop_ref(struct hidraw *hidraw, int exists_bit) | |||
320 | hid_hw_close(hidraw->hid); | 320 | hid_hw_close(hidraw->hid); |
321 | wake_up_interruptible(&hidraw->wait); | 321 | wake_up_interruptible(&hidraw->wait); |
322 | } | 322 | } |
323 | device_destroy(hidraw_class, | ||
324 | MKDEV(hidraw_major, hidraw->minor)); | ||
323 | } else { | 325 | } else { |
324 | --hidraw->open; | 326 | --hidraw->open; |
325 | } | 327 | } |
326 | if (!hidraw->open) { | 328 | if (!hidraw->open) { |
327 | if (!hidraw->exist) { | 329 | if (!hidraw->exist) { |
328 | device_destroy(hidraw_class, | ||
329 | MKDEV(hidraw_major, hidraw->minor)); | ||
330 | hidraw_table[hidraw->minor] = NULL; | 330 | hidraw_table[hidraw->minor] = NULL; |
331 | kfree(hidraw); | 331 | kfree(hidraw); |
332 | } else { | 332 | } else { |