Re: [PATCH] usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()'

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

 



On Mon, Apr 27, 2020 at 10:21:16PM +0200, Christophe JAILLET wrote:
> A call to 'regulator_get()' is hidden in 'twl6030_usb_ldo_init()'. A
> corresponding put must be performed in the error handling path, as
> already done in the remove function.
> 
> While at it, also move a 'free_irq()' call in the error handling path in
> order to be consistent.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> Maybe adding a 'twl6030_usb_ldo_uninit()' function would be more explicit.

It would be nicer, yes, but probably this is fine too.

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux