Commit 2efc9301 authored by Daniele Bellucci's avatar Daniele Bellucci Committed by Greg Kroah-Hartman

[PATCH] Audit and minor cleanups in drivers/usb/*

- if usb_register fails report back its return code rather than -1
parent 31bc140b
......@@ -249,17 +249,20 @@ static struct usb_driver brlvger_driver =
static int
__init brlvger_init (void)
{
int retval;
printk(BANNER);
if(stall_tries < 1 || write_repeats < 1)
return -EINVAL;
if (usb_register(&brlvger_driver)) {
retval = usb_register(&brlvger_driver);
if (retval) {
err("USB registration failed");
return -ENOSYS;
goto out;
}
return 0;
out:
return retval;
}
static 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