aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/endpoint.c
diff options
context:
space:
mode:
authorRahul Ruikar <rahul.ruikar@gmail.com>2010-10-07 09:31:12 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:22:06 -0700
commit7b3a766c7b9bce07875098cb68642df2b8f0b152 (patch)
tree44c919d975ce34d2c7498c0814ed354a8b8c114e /drivers/usb/core/endpoint.c
parent93ad03d60b5b18897030038234aa2ebae8234748 (diff)
downloadkernel_samsung_crespo-7b3a766c7b9bce07875098cb68642df2b8f0b152.zip
kernel_samsung_crespo-7b3a766c7b9bce07875098cb68642df2b8f0b152.tar.gz
kernel_samsung_crespo-7b3a766c7b9bce07875098cb68642df2b8f0b152.tar.bz2
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/core/endpoint.c')
-rw-r--r--drivers/usb/core/endpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c
index 3788e73..9da2505 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,
return retval;
error_register:
- kfree(ep_dev);
+ put_device(&ep_dev->dev);
exit:
return retval;
}