diff options
author | Rahul Ruikar <rahul.ruikar@gmail.com> | 2010-10-07 00:01:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:22:06 -0400 |
commit | 7b3a766c7b9bce07875098cb68642df2b8f0b152 (patch) | |
tree | 44c919d975ce34d2c7498c0814ed354a8b8c114e /drivers/usb | |
parent | 93ad03d60b5b18897030038234aa2ebae8234748 (diff) |
usb: core: endpoint: Fix error path
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/endpoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index 3788e738e265..9da250563027 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c | |||
@@ -202,7 +202,7 @@ int usb_create_ep_devs(struct device *parent, | |||
202 | return retval; | 202 | return retval; |
203 | 203 | ||
204 | error_register: | 204 | error_register: |
205 | kfree(ep_dev); | 205 | put_device(&ep_dev->dev); |
206 | exit: | 206 | exit: |
207 | return retval; | 207 | return retval; |
208 | } | 208 | } |