lkml.org 
[lkml]   [2010]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] usb: core: endpoint: Fix error path
Greg,

Kindly include this patch.

- Rahul Ruikar





On 7 October 2010 09:31, Rahul Ruikar <rahul.ruikar@gmail.com> wrote:
> In function usb_create_ep_devs()
> call put_device() when device_register() fails.
>
> Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
> ---
>  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 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;
>  }
> --
> 1.7.2.3
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-10-07 06:07    [W:0.032 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site