ChangeSet 1.1276.1.32, 2003/08/27 11:28:00-07:00, bellucda@tiscali.it [PATCH] ...more usb audit - audit hiddev_init in hid_init - audit usb_register in hid_init drivers/usb/input/hid-core.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c Tue Sep 2 12:44:39 2003 +++ b/drivers/usb/input/hid-core.c Tue Sep 2 12:44:39 2003 @@ -1691,11 +1691,20 @@ static int __init hid_init(void) { - hiddev_init(); - usb_register(&hid_driver); + int retval; + retval = hiddev_init(); + if (retval) + goto hiddev_init_fail; + retval = usb_register(&hid_driver); + if (retval) + goto usb_register_fail; info(DRIVER_VERSION ":" DRIVER_DESC); return 0; +usb_register_fail: + hiddev_exit(); +hiddev_init_fail: + return retval; } static void __exit hid_exit(void)