lkml.org 
[lkml]   [2019]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 049/125] can: dev: add missing of_node_put() after calling of_get_child_by_name()
    Date
    From: Wen Yang <wenyang@linux.alibaba.com>

    commit db9ee384f6f71f7c5296ce85b7c1a2a2527e7c72 upstream.

    of_node_put() needs to be called when the device node which is got
    from of_get_child_by_name() finished using.

    Fixes: 2290aefa2e90 ("can: dev: Add support for limiting configured bitrate")
    Cc: Franklin S Cooper Jr <fcooper@ti.com>
    Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
    Cc: linux-stable <stable@vger.kernel.org>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/can/dev.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/net/can/dev.c
    +++ b/drivers/net/can/dev.c
    @@ -853,6 +853,7 @@ void of_can_transceiver(struct net_devic
    return;

    ret = of_property_read_u32(dn, "max-bitrate", &priv->bitrate_max);
    + of_node_put(dn);
    if ((ret && ret != -EINVAL) || (!ret && !priv->bitrate_max))
    netdev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit.\n");
    }

    \
     
     \ /
      Last update: 2019-11-11 19:43    [W:2.103 / U:0.300 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site