On Fri, Jan 16, 2015 at 11:32:51AM -0500, Alan Stern wrote:
> This patch fixes a bug in the error pathway of
> usb_add_gadget_udc_release() in udc-core.c.  If the udc registration
> fails, the gadget registration is not fully undone; there's a
> put_device(&gadget->dev) call but no device_del().
> 
> Signed-off-by: Alan Stern <st...@rowland.harvard.edu>
> CC: <sta...@vger.kernel.org>
> 
> ---
> 
> 
> [as1772]
> 
> 
>  drivers/usb/gadget/udc/udc-core.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: usb-3.19/drivers/usb/gadget/udc/udc-core.c
> ===================================================================
> --- usb-3.19.orig/drivers/usb/gadget/udc/udc-core.c
> +++ usb-3.19/drivers/usb/gadget/udc/udc-core.c
> @@ -298,6 +298,7 @@ err4:
>  
>  err3:
>       put_device(&udc->dev);
> +     device_del(&gadget->dev);
>  
>  err2:
>       put_device(&gadget->dev);
> 
Acked-by: Peter Chen <peter.c...@freescale.com>

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to