Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4394330ioa; Wed, 27 Apr 2022 02:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfpgZVa3os/pYxVVUEXzLRYDYc9qCnHBqAd7QQiQiWCCESdMozzMLG7VV1IJSCN07mCECD X-Received: by 2002:a65:654f:0:b0:378:b8f6:ebe4 with SMTP id a15-20020a65654f000000b00378b8f6ebe4mr23080648pgw.399.1651053298156; Wed, 27 Apr 2022 02:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053298; cv=none; d=google.com; s=arc-20160816; b=wqp7TJ5EGuMr9FbtsHRpT3hRyma/ErtY4+FWaKzNw8JPKkRveX3w+8xlsiGxeOcg4r Nr0pSUimKaCWerpuBGYTagz4tfwzrcht2NLSEhRkMeaumwRNV0dkglL6E0WvoWvXdujP Bzvkq5ndU6Pxg17pa1sGzpC8dbnwFnelce03KJQ9mB6MTfUpk/0p2YAFS6bU6X99XoqJ yzykV6c26gQdBuIwnA2Ud62o6Jh3Lyq/Eh6LLhD+gWgljdc3HrZSmNcy44TyPff+0pjo MCLL4B9v9Ck/icSCl8owgqo/b7PZx6vNstERzMAfemhcsaHL79xbrT6/p7IXGnoe/+M7 mJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A84Onct2VoHvusiCdy87TMJHUEQ3zzkIz2T4S+MTekQ=; b=XUildNOrTtzksjGE62AcDy5r8ovVBZIVgf3GlV8RG15ZERzZ2/ip6zsvLLoHo8Gzbb la9Cjv42KlFN4Jsaa4hurCyG3PUYTIIHyxaRBhwKM+okikRAXQq0HX70GHh0pyMpx550 L35L2vyctNyKp4BLdw1JrAG57w/uS/LTSNxStsJ8PIt/tBkGynrxQ0gUnZn2v2BN2/5c YDEpbTiKDnc0Fn4WSVxBwyyYSdAQ/LcB/BpDxgEWdq7hlxpiqj8VNpDJIS0N6ccBBlWX aPVnKxKh6QBCjoCpf8//5mjP60BehKhtOZPqSIiLgq2h+TpjI74ql7Y2fvn0h5EHkNnk c9aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2W1HFwTc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t39-20020a056a0013a700b0050a51a001cbsi954042pfg.258.2022.04.27.02.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:54:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2W1HFwTc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58DFC247642; Wed, 27 Apr 2022 02:25:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348310AbiDZJPo (ORCPT + 99 others); Tue, 26 Apr 2022 05:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346911AbiDZIux (ORCPT ); Tue, 26 Apr 2022 04:50:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B501E16FAEE; Tue, 26 Apr 2022 01:39:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4EC1160A67; Tue, 26 Apr 2022 08:39:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57732C385B0; Tue, 26 Apr 2022 08:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962349; bh=qmlk7RokZF/lJHMgXkXxFzwtYZ21SxX7MjgtQRqnqr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2W1HFwTcL3rGskj3pGtryjabPqvF/aVnjBfTpxDZz09hEGTHRbqBL+BQ3sGx/72Do ss+lyln0ubeNAwUjIZHK7mkId05Cqbulv2R+u+0BMqb8AvN9TSPvO30DOke0L6kJtf eoqlTuNAjhC+LX+wxxvH0J4alu5ILwvl3nbojbaA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Lv Ruyi , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 065/124] dpaa_eth: Fix missing of_node_put in dpaa_get_ts_info() Date: Tue, 26 Apr 2022 10:21:06 +0200 Message-Id: <20220426081749.149686263@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lv Ruyi [ Upstream commit 1a7eb80d170c28be2928433702256fe2a0bd1e0f ] Both of of_get_parent() and of_parse_phandle() return node pointer with refcount incremented, use of_node_put() on it to decrease refcount when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c index 763d2c7b5fb1..5750f9a56393 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c @@ -489,11 +489,15 @@ static int dpaa_get_ts_info(struct net_device *net_dev, info->phc_index = -1; fman_node = of_get_parent(mac_node); - if (fman_node) + if (fman_node) { ptp_node = of_parse_phandle(fman_node, "ptimer-handle", 0); + of_node_put(fman_node); + } - if (ptp_node) + if (ptp_node) { ptp_dev = of_find_device_by_node(ptp_node); + of_node_put(ptp_node); + } if (ptp_dev) ptp = platform_get_drvdata(ptp_dev); -- 2.35.1