Skip to content

Commit

Permalink
usb: core: endpoint: Fix error path
Browse files Browse the repository at this point in the history
In function usb_create_ep_devs()
call put_device() when device_register() fails.

Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rahul Ruikar authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 93ad03d commit 7b3a766
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 @@ -202,7 +202,7 @@ int usb_create_ep_devs(struct device *parent,
return retval;

error_register:
kfree(ep_dev);
put_device(&ep_dev->dev);
exit:
return retval;
}
Expand Down

0 comments on commit 7b3a766

Please sign in to comment.