提交 c5999f0d 编写于 作者: J Josh Triplett 提交者: Greg Kroah-Hartman

USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR

init_endpoint_class calls class_create, and checks the result for an error
with IS_ERR; however, if true, it then returns the result of IS_ERR (a
boolean) rather than PTR_ERR (the actual errno).
Signed-off-by: NJosh Triplett <josh@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 df23fa01
......@@ -229,7 +229,7 @@ static int init_endpoint_class(void)
kref_init(&ep_class->kref);
ep_class->class = class_create(THIS_MODULE, "usb_endpoint");
if (IS_ERR(ep_class->class)) {
result = IS_ERR(ep_class->class);
result = PTR_ERR(ep_class->class);
goto class_create_error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册