]> git.karo-electronics.de Git - mv-sheeva.git/commit
USB: g_printer: fix bug in unregistration
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 10 Jan 2011 16:23:05 +0000 (11:23 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 23 Jan 2011 02:38:57 +0000 (18:38 -0800)
commitd5aa475180d03d45c5dc6134aa833f1b3e89c45e
tree751494124d88366fa8f9369911661bad2b7ad08d
parentbbfba05283ba482ab7c119150fd3c5611939f9fd
USB: g_printer: fix bug in unregistration

This patch (as1441) fixes a bug in g_printer.  The gadget driver, char
device number, and class device should be unregistered in reverse
order of registration.  As it is now, when the module is unloaded the
class device gets unregistered first, causing a crash when the unbind
method tries to access it.

This fixes Bugzilla #25882.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Roland Kletzing <devzero@web.de>
CC: Craig W. Nadler <craig@nadler.us>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/printer.c