ChangeSet 1.1276.1.22, 2003/08/27 10:51:04-07:00, bellucda@tiscali.it [PATCH] Audit and minor cleanups in drivers/usb/* - if usb_register fails report back its return code rather than -1 - static declarations for module_init/cleanup functions - adding missing __init/__exit for module_init/cleanup functions drivers/usb/misc/usblcd.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff -Nru a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c --- a/drivers/usb/misc/usblcd.c Tue Sep 2 12:45:19 2003 +++ b/drivers/usb/misc/usblcd.c Tue Sep 2 12:45:19 2003 @@ -342,18 +342,21 @@ .id_table = id_table, }; -int usb_lcd_init(void) +static int __init usb_lcd_init(void) { - if (usb_register(&lcd_driver) < 0) - return -1; + int retval; + retval = usb_register(&lcd_driver); + if (retval) + goto out; info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION); info("USBLCD support registered."); - return 0; +out: + return retval; } -void usb_lcd_cleanup(void) +static void __exit usb_lcd_cleanup(void) { struct lcd_usb_data *lcd = &lcd_instance;