Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp379259pxb; Mon, 25 Oct 2021 10:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlArS+wJBgCTmaBP0P7mGyD6LU4i7XFWu0K5qLrmlozas3TRjkUCX87bJPHsj/X5aJ9zI6 X-Received: by 2002:a17:906:128d:: with SMTP id k13mr8468665ejb.517.1635181390408; Mon, 25 Oct 2021 10:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635181390; cv=none; d=google.com; s=arc-20160816; b=UguLXZRd+Dr1OFN1RtEa3OrgnjTVR5QLh1lNrBQ2f6BtTYAYiUG2gasymbVI0agvwS GIiJUOqeNixUeGO9CxYnr5vGNKgEdigaKcCXK7WXgbOwHJqcgXY2q9aK1R26Fda5mkmv L+Eh/LvLKfqmD3r+IvzJVRdbN5WM8St/H3phWKRSWS1IjurVzJoL+M43Xd0T1RKspr62 6kctf79dvxCafOkHf10onXKAoMJizIjKsmfUj4kbuXNRcKz9tsyfOuG+yb3C2iqc5HEs OO9aP5y+gtmMEw4oaKSONJoNvg+t/2vvz6e1SVsTr2eEOTqGOrsConpgeHupZTBO4oGf mN8A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k8m7vs3PAgHgrN3YfFm4NP+eJYZ9MvDBIR6TyvqGyGU=; b=NWzFYLnguGdP7zoXsPSypbYef7ZPfQiEcezxcq8qQeEIDd6/BVoWdcWedfQcl+73VI U2RKkDKo0FOZbHHb/d8/AghFE7j37rdCCZuzIhrM/wTjohFNabWosV/xK+B/uZIPu5l+ XtQ5g4/j/da5LiUh4fuR/QYwjg8HBhUElPrO8MrM1ZMZiTKy1Z+X/4x2FXEv8BvLsas3 VaXWGks7lGeV9BVh5HuUV/IAT2K9GCvS2WW5klnaEFGEReJwhQzQKMov5yTIKsYF1m0q qPWNAGY6+E6lFhe9roZKzNpU9To8WL/lET3K3gtCFuaYejk0Z3EECfqiR1uc/mwFetDU zwYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vho3MLEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si22442712ejc.253.2021.10.25.10.02.34; Mon, 25 Oct 2021 10:03:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vho3MLEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234206AbhJYRCh (ORCPT + 99 others); Mon, 25 Oct 2021 13:02:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:54874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234244AbhJYRC0 (ORCPT ); Mon, 25 Oct 2021 13:02:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E74BD61002; Mon, 25 Oct 2021 17:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635181204; bh=bH0mUMW9hR/R/aLe0E7cyxVLgQRHz/PhydPW/eavJ9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vho3MLECQVWQinGt6U75DTtwWkFKTHxGHUfdd7YEsWdHG7ZHxjgLX1+23QxzY4T08 6UlIvVxCYRcRc1zEgk2GWFB1izjURqtRjYgDUDl/FtjC5scIGntr+dv0nd/vO6Sg/P TdSG46rIagjSw1lACl+7l8IbWcI06g9S4dBidBZEnGYPqXqj/8Qg3RLhP+YXB0f4FM FCdJ2CldwHIFVXZwxjD/+2KR3nIQBnk0iNmGYMHwMk7I4GrLyN75d/sn0xGUzKeRam mD72ksxmuRSx2V3fKvYSefZzeVn+PkqEErHrNTPI7eycemJAWWQBcP356jUARqZSNF GkHDzIyg6j7pQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wan Jiabing , "David S . Miller" , Sasha Levin , vladimir.oltean@nxp.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, kuba@kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 08/18] net: mscc: ocelot: Add of_node_put() before goto Date: Mon, 25 Oct 2021 12:59:21 -0400 Message-Id: <20211025165939.1393655-8-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211025165939.1393655-1-sashal@kernel.org> References: <20211025165939.1393655-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wan Jiabing [ Upstream commit d1a7b9e4696584ce05c12567762c18a866837a85 ] Fix following coccicheck warning: ./drivers/net/ethernet/mscc/ocelot_vsc7514.c:946:1-33: WARNING: Function for_each_available_child_of_node should have of_node_put() before goto. Early exits from for_each_available_child_of_node should decrement the node reference counter. Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c index 4bd7e9d9ec61..03cfa0dc7bf9 100644 --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c +++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c @@ -972,6 +972,7 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev, target = ocelot_regmap_init(ocelot, res); if (IS_ERR(target)) { err = PTR_ERR(target); + of_node_put(portnp); goto out_teardown; } -- 2.33.0