Commit 38f20276 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 0
parent f97605c6
...@@ -1388,11 +1388,13 @@ vicam_disconnect(struct usb_interface *intf) ...@@ -1388,11 +1388,13 @@ vicam_disconnect(struct usb_interface *intf)
static int __init static int __init
usb_vicam_init(void) usb_vicam_init(void)
{ {
int retval;
DBG(KERN_INFO "ViCam-based WebCam driver startup\n"); DBG(KERN_INFO "ViCam-based WebCam driver startup\n");
vicam_create_proc_root(); vicam_create_proc_root();
if (usb_register(&vicam_driver) != 0) retval = usb_register(&vicam_driver);
if (retval)
printk(KERN_WARNING "usb_register failed!\n"); printk(KERN_WARNING "usb_register failed!\n");
return 0; return retval;
} }
static void __exit static void __exit
......
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