Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4793229ybn; Sat, 28 Sep 2019 07:32:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlrvoHg6n9jZcqfVQhqbiOzp8QSda/lo1xZRph8P1Tm0xUt8mRZy47k+iufL4QUbu+JjZm X-Received: by 2002:a17:906:4a11:: with SMTP id w17mr11851295eju.21.1569681124384; Sat, 28 Sep 2019 07:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569681124; cv=none; d=google.com; s=arc-20160816; b=eKsXLbmWr6/kRXetAN/TIoO9x2fylbnRVJMBxmrmI7xczXMxdnSdWAJ/VuFMGkGV/A UTw/KAVCQBieS7cx/svvcS5fhUtvWxTHDfg+W//Xu6ZjIjpMBsoLCldODoV94WOuMyqe 4n1CjazXXbEihYc5vZIMxsjLWK3xsfspz044S7G5n3ZFd3zUwsF0rFFjB3Qnamw6y3At mDLiXiec7SaYGXTjJjZRTWd45h+gCLe2mcMpWo/lNMzeYcpIkJswekwyJGjf8tX5lE1/ bOWecQfv6FvycoYvX0T86d9IyU+WlnFCh3+3G9oCt8Svr8hKxUr+On/SSOgZmIrsEjnF R1ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Sx6ibaj3x0hU0Kj1YPULQKfnX8/gsA+N8LnAu+/Ij3M=; b=FI82xnf1QSyCaFaweqhIO/IAhjp1nXV2dZ81a5tgc9J+rW4HaqxTHN6dhp0FbrFpuM pab8g7u+IdohQ4XQ5nzbpPhLCWIQ05K0veGUMQAc/ObALjUBeRacQQMbmj6aL6HhXdws O1I2PaQNbZKFwPQQ999N+PpLf0IUG3OG1PzjtKFFuGnLcD2gshwb2URs7qNGZvMIPF+i 9iWyvY2xI1bnkVskbuGh/nIIlhMYAYm3Jf1FiK32iZLYOe2TrGmjRLoLfOV7VlQb4I37 1s6S4zCsD+CMPrV4dZwlbyp8R4qY6sGtNtF/sVVAlTuFZGXoBVzPckR11DoZpW9UGsM1 v+bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p43si3508205edc.368.2019.09.28.07.31.09; Sat, 28 Sep 2019 07:32:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728444AbfI1ObE (ORCPT + 99 others); Sat, 28 Sep 2019 10:31:04 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:46942 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfI1ObE (ORCPT ); Sat, 28 Sep 2019 10:31:04 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01451;MF=wenyang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0TdeNtUM_1569681047; Received: from localhost(mailfrom:wenyang@linux.alibaba.com fp:SMTPD_---0TdeNtUM_1569681047) by smtp.aliyun-inc.com(127.0.0.1); Sat, 28 Sep 2019 22:30:59 +0800 From: Wen Yang To: Wolfgang Grandegger , Marc Kleine-Budde Cc: xlpang@linux.alibaba.com, Wen Yang , "David S. Miller" , Franklin S Cooper Jr , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] can: dev: add missing of_node_put after calling of_get_child_by_name Date: Sat, 28 Sep 2019 22:29:05 +0800 Message-Id: <20190928142905.34832-1-wenyang@linux.alibaba.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Wen Yang Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Franklin S Cooper Jr Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- 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 ac86be5..1c88c36 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"); } -- 1.8.3.1