From: Rahul Ruikar Date: Thu, 7 Oct 2010 04:01:12 +0000 (+0530) Subject: usb: core: endpoint: Fix error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b3a766c7b9bce07875098cb68642df2b8f0b152;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: core: endpoint: Fix error path In function usb_create_ep_devs() call put_device() when device_register() fails. Signed-off-by: Rahul Ruikar Signed-off-by: Greg Kroah-Hartman --- 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; }