aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
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
parentUSB: cp210x: Add WAGO 750-923 Service Cable device ID (diff)
downloadlinux-dev-7b3a766c7b9bce07875098cb68642df2b8f0b152.tar.xz
linux-dev-7b3a766c7b9bce07875098cb68642df2b8f0b152.zip
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;
}