Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp379505pxb; Mon, 25 Oct 2021 10:03:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm4+kK14hCANc1FAD3h8OiE10ss1UEaD9fV8+pWv6HR7qmnjMdff2DUkgL8IlbVdkdmY/L X-Received: by 2002:a17:906:5a63:: with SMTP id my35mr23933113ejc.104.1635181403382; Mon, 25 Oct 2021 10:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635181403; cv=none; d=google.com; s=arc-20160816; b=ErWAY0/zRtDDXrEJMOgX9Kg01gXq6CpYogTT+YqTRIUFRimZR9Yd4J7fjqnf2esIIm Y8ZgVX7oGxDsNkExoaBMBx63023o3arOW1bn5z+ALJW2I4y0KaQSNUAm0PVV40yVv4AY KLg27Qvd3sOIXyxPF/lnW09mKiDo1OQrw4VtSEHdUtWCjiVVpkt0TbdFKpCmgPrXj0wV vB7lq8wGzWRdQAH5n8z9VGOnraNBqCZAwKd+WiGgcAfdzQDhpjr1nFknIBjHVhnsce8H dpdzK43CYZulsnW/oQ6MCP16EoaIpWFBOzztYp/ZpGAjHGsBoXNu+hqzUfkFlPcBwiDw HCbQ== 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=ld3A/4fxuOO4UomPNgv4LINPhV9NJ/AsDamhGwX6hbI=; b=YFbrHH83FWWLVGnCB1pTTOl+R/EWssOAEXdsQADtN6mUsfi2c8Ey9rNKmzAoOKQlMA nukpZQ1+M0Bwx7iKlXntCh3anYsacj/8j7RXea36gkJgHopMvW1Xr7KzSdxvHVcgMoYX lJ/P9RgwU/Lvpnm/qhIVWoM+cAFJ7g+l91CY53kQzHQyetLL8A+6lWm4koxCQhD4frk1 d6SBjxcjc7d+6zephsxc+d6JH/8iZMzLhhjcq1UFScPlCDv2dp/eiLXdniL4pco8A3mH vkIw61QsuqXqFG08z3X0E+s9abpfJDRE4eoNliSwmvrNdpwXXaKLUSpx8B6oxEMTP7V1 gpaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XbuFw/87"; 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 y22si18373505edc.353.2021.10.25.10.02.50; Mon, 25 Oct 2021 10:03:23 -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="XbuFw/87"; 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 S234102AbhJYRCe (ORCPT + 99 others); Mon, 25 Oct 2021 13:02:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:54846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234118AbhJYRCY (ORCPT ); Mon, 25 Oct 2021 13:02:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 126AB60F22; Mon, 25 Oct 2021 17:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635181202; bh=4zrUyzXuxJ9pkKXnnxIBGpTCdtmBMLCyzj2zXTJPccc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XbuFw/87KJw+MZ4EHi079AwPZAETZ/QmNySmLTik+V9J1c3kxNjrmA3e0jJj4Wczn TmcqHXVMdMq6aEw1cJKu4UmmttoFks3QXsAS29G+3ycDu2Q6NKCQ9r025IX2fJOeIP UnZJQKvHlmiwdQ2gxtNaiGMR8tjqxlgbD+SlyoQaok8HT5GUoyyjklCO4gpZ7lZttN UbVdfzsIcYuZ26tClwUAQE4LSPX7wL7ej5Jl4NdUvQKuBgul8sf5AWi3XqCdnM1Yze GrSj2/DnjXW794sVS9+G9lvuDYagEvgGqnjEdoD45m8jAKu0tp7mR+/iUDWp8bULS7 6hr2wLYm5KYvw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wan Jiabing , "David S . Miller" , Sasha Levin , kuba@kernel.org, lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, UNGLinuxDriver@microchip.com, bjarni.jonasson@microchip.com, yangyingliang@huawei.com, nathan@kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.14 07/18] net: sparx5: Add of_node_put() before goto Date: Mon, 25 Oct 2021 12:59:20 -0400 Message-Id: <20211025165939.1393655-7-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 d9fd7e9fccfac466fb528a783f2fc76f2982604c ] Fix following coccicheck warning: ./drivers/net/ethernet/microchip/sparx5/s4parx5_main.c:723: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/microchip/sparx5/sparx5_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index f666133a15de..6e9058265d43 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -743,6 +743,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev) err = dev_err_probe(sparx5->dev, PTR_ERR(serdes), "port %u: missing serdes\n", portno); + of_node_put(portnp); goto cleanup_config; } config->portno = portno; -- 2.33.0