Re: [PATCH 1/2] s3c-hsudc: reorder error handling in start function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, Dec 03, 2011 at 07:38:36PM +0100, Heiko Stübner wrote:
> This removes duplicate code and makes room for more error handling steps.
> 
> Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
> ---
>  drivers/usb/gadget/s3c-hsudc.c |   22 ++++++++++------------
>  1 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
> index 787ac5b..74be824 100644
> --- a/drivers/usb/gadget/s3c-hsudc.c
> +++ b/drivers/usb/gadget/s3c-hsudc.c
> @@ -1165,11 +1165,7 @@ static int s3c_hsudc_start(struct usb_gadget_driver *driver,
>  	ret = bind(&hsudc->gadget);
>  	if (ret) {
>  		dev_err(hsudc->dev, "%s: bind failed\n", hsudc->gadget.name);
> -		device_del(&hsudc->gadget.dev);
> -
> -		hsudc->driver = NULL;
> -		hsudc->gadget.dev.driver = NULL;
> -		return ret;
> +		goto err_bind;
>  	}
>  
>  	/* connect to bus through transceiver */

while at that, please move to the newer udc_start()/udc_stop()
callbacks. We want to remove duplicated code from UDC drivers. There's
still time to respin this patch and move to those guys.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux