lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3] device property: fix of node refcount leak in fwnode_graph_get_next_endpoint()
    Hi Yang,

    Thank you for the patch.

    On Wed, Nov 23, 2022 at 10:25:42AM +0800, Yang Yingliang wrote:
    > The 'parent' returned by fwnode_graph_get_port_parent()
    > with refcount incremented when 'prev' is not NULL, it
    > needs be put when finish using it.
    >
    > Because the parent is const, introduce a new variable to
    > store the returned fwnode, then put it before returning
    > from fwnode_graph_get_next_endpoint().
    >
    > Fixes: b5b41ab6b0c1 ("device property: Check fwnode->secondary in fwnode_graph_get_next_endpoint()")
    > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

    Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>

    --
    Sakari Ailus

    \
     
     \ /
      Last update: 2022-11-25 10:59    [W:2.252 / U:0.516 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site