lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-04-28 19:59    [W:0.147 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site