diff options
author | Wen Yang <wenyang@linux.alibaba.com> | 2019-09-28 22:29:05 +0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-11-04 21:47:20 +0100 |
commit | db9ee384f6f71f7c5296ce85b7c1a2a2527e7c72 (patch) | |
tree | ac9e404673cd4c89d2be450057431f16ab284443 | |
parent | 3d1e5039f5f87a8731202ceca08764ee7cb010d3 (diff) |
can: dev: add missing of_node_put() after calling of_get_child_by_name()
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>
-rw-r--r-- | drivers/net/can/dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index ac86be52b461..1c88c361938c 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -848,6 +848,7 @@ void of_can_transceiver(struct net_device *dev) 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"); } |