summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorRahul Ruikar <rahul.ruikar@gmail.com>2010-10-07 08:01:12 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 21:22:06 +0400
commit7b3a766c7b9bce07875098cb68642df2b8f0b152 (patch)
tree44c919d975ce34d2c7498c0814ed354a8b8c114e /drivers/usb
parent93ad03d60b5b18897030038234aa2ebae8234748 (diff)
downloadlinux-7b3a766c7b9bce07875098cb68642df2b8f0b152.tar.xz
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.c2
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,
return retval;
error_register:
- kfree(ep_dev);
+ put_device(&ep_dev->dev);
exit:
return retval;
}