Skip to content

Commit

Permalink
USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, no…
Browse files Browse the repository at this point in the history
…t 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: Josh Triplett <josh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Josh Triplett authored and Greg Kroah-Hartman committed Feb 16, 2007
1 parent df23fa0 commit c5999f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c5999f0

Please sign in to comment.