Commit 856a84f8 authored by Daniele Bellucci's avatar Daniele Bellucci Committed by Greg Kroah-Hartman

[PATCH] USB: PATCH 2/19 Audit usb_register/usb_serial_register under divers/usb/serial

parent 82dd4505
...@@ -464,13 +464,22 @@ static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs ...@@ -464,13 +464,22 @@ static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs
static int __init cyberjack_init (void) static int __init cyberjack_init (void)
{ {
usb_serial_register (&cyberjack_device); int retval;
usb_register (&cyberjack_driver); retval = usb_serial_register(&cyberjack_device);
if (retval)
goto failed_usb_serial_register;
retval = usb_register(&cyberjack_driver);
if (retval)
goto failed_usb_register;
info(DRIVER_VERSION " " DRIVER_AUTHOR); info(DRIVER_VERSION " " DRIVER_AUTHOR);
info(DRIVER_DESC); info(DRIVER_DESC);
return 0; return 0;
failed_usb_register:
usb_serial_deregister(&cyberjack_device);
failed_usb_serial_register:
return retval;
} }
static void __exit cyberjack_exit (void) static void __exit cyberjack_exit (void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment