Messages in this thread | | | Date | Tue, 28 Apr 2020 20:58:14 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH] usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()' |
| |
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@wanadoo.fr> > --- > 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@oracle.com>
regards, dan carpenter
| |