stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org, linux-can <linux-can@vger.kernel.org>
Cc: davem@davemloft.net, kernel@pengutronix.de,
	jhofstee@victronenergy.com,
	"Martin Hundebøll" <martin@geanix.com>,
	"Kurt Van Dijck" <dev.kurt@vandijck-laurijssen.be>,
	"Wen Yang" <wenyang@linux.alibaba.com>,
	"Franklin S Cooper Jr" <fcooper@ti.com>,
	linux-stable <stable@vger.kernel.org>,
	"Marc Kleine-Budde" <mkl@pengutronix.de>
Subject: [PATCH 01/29] can: dev: add missing of_node_put() after calling of_get_child_by_name()
Date: Thu, 10 Oct 2019 14:17:22 +0200	[thread overview]
Message-ID: <20191010121750.27237-2-mkl@pengutronix.de> (raw)
In-Reply-To: <20191010121750.27237-1-mkl@pengutronix.de>

From: Wen Yang <wenyang@linux.alibaba.com>

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>
---
 drivers/net/can/dev.c | 1 +
 1 file changed, 1 insertion(+)

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");
 }
-- 
2.23.0


       reply	other threads:[~2019-10-10 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191010121750.27237-1-mkl@pengutronix.de>
2019-10-10 12:17 ` Marc Kleine-Budde [this message]
2019-10-10 12:17 ` [PATCH 02/29] can: gs_usb: gs_can_open(): prevent memory leak Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 03/29] can: mcba_usb: fix use-after-free on disconnect Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 04/29] can: usb_8dev: " Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 05/29] can: flexcan: disable completely the ECC mechanism Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 06/29] can: peak_usb: fix a potential out-of-sync while decoding packets Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 08/29] can: c_can: c_can_poll(): only read status register after status IRQ Marc Kleine-Budde
2019-10-10 12:17 ` [PATCH 12/29] can: rx-offload: can_rx_offload_queue_sorted(): fix error handling, avoid skb mem leak Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010121750.27237-2-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=dev.kurt@vandijck-laurijssen.be \
    --cc=fcooper@ti.com \
    --cc=jhofstee@victronenergy.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=martin@geanix.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wenyang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).