diff options
author | Fabian Godehardt <fg@emlix.com> | 2011-09-01 12:15:46 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-18 08:33:06 (GMT) |
commit | 8582d86143c690c68cc42f996def466a035bee34 (patch) | |
tree | b1f76f9d2a83485a24896c11d3cbe30193636efe /drivers | |
parent | fba9e546eac984d46c4a16253344d7297c24d75c (diff) | |
download | linux-8582d86143c690c68cc42f996def466a035bee34.tar.xz |
USB: g_printer: fix bug in unregistration
The allocated chardevice region range is only 1 device but on
unregister it currently tries to deregister 2.
Found this while doing a insmod/rmmod/insmod/rm... of the module
which seemed to eat major numbers.
Signed-off-by: Fabian Godehardt <fg@emlix.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/printer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 68a0efb..65a8834 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -1594,7 +1594,7 @@ cleanup(void) if (status) ERROR(dev, "usb_gadget_unregister_driver %x\n", status); - unregister_chrdev_region(g_printer_devno, 2); + unregister_chrdev_region(g_printer_devno, 1); class_destroy(usb_gadget_class); mutex_unlock(&usb_printer_gadget.lock_printer_io); } |