Re: [PATCH RFC] usb: musb: Free NIrq in a missing error path

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

 



Hi,

On Tue, Aug 07, 2012 at 07:56:32PM +0530, Shubhrajyoti D wrote:
> In one of the error paths the free of nIrq was missed.
> Fix the same.
> 
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
> ---
>  drivers/usb/musb/musb_core.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index cf22953..d4504d5 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -2034,7 +2034,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
>  
>  	}
>  	if (status < 0)
> -		goto fail3;
> +		goto free_irq;
>  
>  	status = musb_init_debugfs(musb);
>  	if (status < 0)
> @@ -2066,12 +2066,12 @@ fail5:
>  	musb_exit_debugfs(musb);
>  
>  fail4:
> -	free_irq(musb->nIrq, musb);
>  	if (!is_otg_enabled(musb) && is_host_enabled(musb))
>  		usb_remove_hcd(musb_to_hcd(musb));
>  	else
>  		musb_gadget_cleanup(musb);
> -
> +free_irq:
> +	free_irq(musb->nIrq, musb);

a nicer patch (if you want to provide it) would be to convert musb to
devm_* apis, so a bunch of this pointless error path handling can be
dropped ;-)

-- 
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