lkml.org 
[lkml]   [2014]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] genalloc: fix device node resource counter
    Date
    The change balances a usage counter of np_pool device_node, which is
    incremented on preceding of_parse_phandle() call.

    Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Olof Johansson <olof@lixom.net>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    ---
    lib/genalloc.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/lib/genalloc.c b/lib/genalloc.c
    index c7a91cf..cce4dd6 100644
    --- a/lib/genalloc.c
    +++ b/lib/genalloc.c
    @@ -637,6 +637,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
    if (!np_pool)
    return NULL;
    pdev = of_find_device_by_node(np_pool);
    + of_node_put(np_pool);
    if (!pdev)
    return NULL;
    return dev_get_gen_pool(&pdev->dev);
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2014-09-24 22:21    [W:3.191 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site