Re: [PATCH 3/4] usb/s3c-hsudc: fix error path

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

 



Thank you for sending the patch.

Acked-by: Jingoo Han <jg1.han@xxxxxxxxxxx>

> ------- Original Message -------
> Sender : Sebastian Andrzej Siewior<bigeasy@xxxxxxxxxxxxx> 
> Date   : Jun 04, 2011 02:50 (GMT+09:00)
> Title  : [PATCH 3/4] usb/s3c-hsudc: fix error path
> 
> I doubt the clock is optional. In case it is it should not return with
> an error code because we leak everything.
> 
> Cc: Jingoo Han <jg1.han@xxxxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/usb/gadget/s3c-hsudc.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
> index cfe3cf5..729dd9c 100644
> --- a/drivers/usb/gadget/s3c-hsudc.c
> +++ b/drivers/usb/gadget/s3c-hsudc.c
> @@ -1301,7 +1301,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
>  	hsudc->uclk = clk_get(&pdev->dev, "usb-device");
>  	if (IS_ERR(hsudc->uclk)) {
>  		dev_err(dev, "failed to find usb-device clock source
> ");
> -		return PTR_ERR(hsudc->uclk);
> +		ret = PTR_ERR(hsudc->uclk);
> +		goto err_clk;
>  	}
>  	clk_enable(hsudc->uclk);
>  
> @@ -1310,7 +1311,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
>  	disable_irq(hsudc->irq);
>  	local_irq_enable();
>  	return 0;
> -
> +err_clk:
> +	free_irq(hsudc->irq, hsudc);
>  err_irq:
>  	iounmap(hsudc->regs);
>  
> -- 
> 1.7.4.4ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴¥Š{깸ëþ)í끾èw*jgП¨¶‰šŽ듶¢jÿ¾?G«앶ÿ◀◁¦j:+v돣ŠwèjØm¶Ÿÿ?®w?듺þf"·hš뤴얎ÿ녪¥



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

  Powered by Linux