[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE-0n51SfZiQ_XnPXYrG4Fyu=H8xDc0zpJ_Hxa+MrFq8V8PXTQ@mail.gmail.com>
Date: Tue, 2 Jul 2024 12:00:34 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] usb: core: add missing of_node_put() in usb_of_has_devices_or_graph
Quoting Javier Carrasco (2024-06-24 14:10:06)
> The for_each_child_of_node() macro requires an explicit call to
> of_node_put() on early exits to decrement the child refcount and avoid a
> memory leak.
> The child node is not required outsie the loop, and the resource must be
> released before the function returns.
>
> Add the missing of_node_put().
>
> Cc: stable@...r.kernel.org
> Fixes: 82e82130a78b ("usb: core: Set connect_type of ports based on DT node")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Powered by blists - more mailing lists