• Alan Stern's avatar
    USB: g_printer: fix bug in unregistration · d5aa4751
    Alan Stern authored
    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: default avatarAlan 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    d5aa4751
printer.c 40.5 KB