diff options
author | Fabian Godehardt <fg@emlix.com> | 2011-09-01 14:15:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:35:36 -0800 |
commit | 76fa3531d09c55ecf99ea62f13f8b1dd8be076e1 (patch) | |
tree | 3f974572313f0753608da4eb6701435e5f4655f1 /drivers/usb | |
parent | f72d6f85aa5857d889a2b4a41f2bd6be4918703a (diff) | |
download | kernel_samsung_espresso10-76fa3531d09c55ecf99ea62f13f8b1dd8be076e1.zip kernel_samsung_espresso10-76fa3531d09c55ecf99ea62f13f8b1dd8be076e1.tar.gz kernel_samsung_espresso10-76fa3531d09c55ecf99ea62f13f8b1dd8be076e1.tar.bz2 |
USB: g_printer: fix bug in unregistration
commit 8582d86143c690c68cc42f996def466a035bee34 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-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 271ef94..88a464c 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -1602,7 +1602,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); } |