提交 5cebfb75 编写于 作者: M Mark M. Hoffman 提交者: Greg Kroah-Hartman

[PATCH] USB: trivial error path fix

Trivial fix to USB class-creation error path; please apply.
Signed-off-by: NMark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 56b22935
...@@ -82,6 +82,7 @@ int usb_major_init(void) ...@@ -82,6 +82,7 @@ int usb_major_init(void)
usb_class = class_create(THIS_MODULE, "usb"); usb_class = class_create(THIS_MODULE, "usb");
if (IS_ERR(usb_class)) { if (IS_ERR(usb_class)) {
error = PTR_ERR(usb_class);
err("class_create failed for usb devices"); err("class_create failed for usb devices");
unregister_chrdev(USB_MAJOR, "usb"); unregister_chrdev(USB_MAJOR, "usb");
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册