On Fri, Feb 22, 2019 at 8:15 AM Wen Yang <[email protected]> wrote:
> The call to of_get_child_by_name returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/net/dsa/rtl8366rb.c:510:2-8: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > ./drivers/net/dsa/rtl8366rb.c:518:2-8: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > ./drivers/net/dsa/rtl8366rb.c:540:2-8: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > ./drivers/net/dsa/rtl8366rb.c:548:2-8: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > ./drivers/net/dsa/rtl8366rb.c:556:2-8: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > ./drivers/net/dsa/rtl8366rb.c:561:1-7: ERROR: missing of_node_put; acquired a > node pointer with refcount incremented on line 501, but without a > corresponding object release within this function. > > Signed-off-by: Wen Yang <[email protected]> > Cc: Linus Walleij <[email protected]> > Cc: Andrew Lunn <[email protected]> > Cc: Vivien Didelot <[email protected]> > Cc: Florian Fainelli <[email protected]> > Cc: "David S. Miller" <[email protected]> > Cc: [email protected] > Cc: [email protected] Acked-by: Linus Walleij <[email protected]> Yours, Linus Walleij
