[PATCH] USB: trivial error path fix
authorMark M. Hoffman <mhoffman@lightlink.com>
Tue, 3 May 2005 03:35:45 +0000 (23:35 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jun 2005 22:15:09 +0000 (15:15 -0700)
Trivial fix to USB class-creation error path; please apply.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/file.c

index dfcbd05d0e81923f062a3f9d0891424439de4579..65ca131cc44cc8c8e13e298ea47b1bcf4022353d 100644 (file)
@@ -82,6 +82,7 @@ int usb_major_init(void)
 
        usb_class = class_create(THIS_MODULE, "usb");
        if (IS_ERR(usb_class)) {
+               error = PTR_ERR(usb_class);
                err("class_create failed for usb devices");
                unregister_chrdev(USB_MAJOR, "usb");
                goto out;