On Fri, Feb 22, 2019 at 8:15 AM Wen Yang <wen.yan...@zte.com.cn> 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 <wen.yan...@zte.com.cn>
> Cc: Linus Walleij <linus.wall...@linaro.org>
> Cc: Andrew Lunn <and...@lunn.ch>
> Cc: Vivien Didelot <vivien.dide...@gmail.com>
> Cc: Florian Fainelli <f.faine...@gmail.com>
> Cc: "David S. Miller" <da...@davemloft.net>
> Cc: netdev@vger.kernel.org
> Cc: linux-ker...@vger.kernel.org

Acked-by: Linus Walleij <linus.wall...@linaro.org>

Yours,
Linus Walleij

Reply via email to