Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Josh Triplett <josh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Josh Triplett and committed by
Greg Kroah-Hartman
c5999f0d df23fa01

+1 -1
+1 -1
drivers/usb/core/endpoint.c
··· 229 229 kref_init(&ep_class->kref); 230 230 ep_class->class = class_create(THIS_MODULE, "usb_endpoint"); 231 231 if (IS_ERR(ep_class->class)) { 232 - result = IS_ERR(ep_class->class); 232 + result = PTR_ERR(ep_class->class); 233 233 goto class_create_error; 234 234 } 235 235