From patchwork Mon Oct 24 11:29:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9531 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp483653wru; Mon, 24 Oct 2022 07:27:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6H3wNxg6VcEhM49p7ikgSpc9wS9LJ0Pucd/DSWZHSA6aOlFvztHL+Yy4FG5OxVxsiD2WHT X-Received: by 2002:a17:902:eb89:b0:185:33d:cb34 with SMTP id q9-20020a170902eb8900b00185033dcb34mr33538941plg.55.1666621675393; Mon, 24 Oct 2022 07:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666621675; cv=none; d=google.com; s=arc-20160816; b=g6PV6GG5fK9s3um22Lc6CYyX+nPKcQ4JppL36k8DH5CXpX4AXvjrFEJLI47ARUOi6u XNXXZX4+ZofrGUJ0xUWqF65rUrkMWV58or+UaHRYeceo0HH1K6+QUFgOfH6K5ldk2XWu GlacJuMbKp4G36+duf0I86ABcVDBKy9gtdcyXnUk/r9iabWv8QVxVtTDWKBIiJC9eWzr J6KS4POVBCg+jsw4LOYiEnoFJ7GX6hr+hQTh8Qm5KgdinrCgbGFdPRw/OINFKJeCXYxb Ew6GPB6IJRZJE31GDEj/47xlKU8SXkMe5Dr+oXwTBQhHPiUYWkOe0SBjZ4YkJuqF8aHv TaDg== 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=sAWuKxm5KE5yho2DHO6WVJq2sT80b5mYbiICUduid8U=; b=CRxTLnEkQdSJyVTABXVkgUYoOtKC/Vld6NiG4S66buwmRxbrTIc0U0LBJRs0kxHZi2 lF2MCWToiBkMqTLHx1ihqijHaBvVsOAlab78GRJ+DUKAscVRWDR3XNmHIkGL7YT8mN7+ powxXlLmuGtkvEKhuq7t9AeOFx18yl+7LXWnCHLqpXa1kNbS6RK7RGJsWjmUgHhhzsat Flnh04V0hLKuXBYXZk8gNeLcBcbi6i3WW7czXzHzyx/7vqt0tdJeiEyg4MgFzBKl0ulx Ro6FX4W4DmmytpghfjIb8ticScAj17lK5tyeXyTI9BaWF1Itz+keUAbOecO5geQ9QrRf mXZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="J/61Ilxm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170902b60700b0017f685c2e4dsi31438292pls.136.2022.10.24.07.27.42; Mon, 24 Oct 2022 07:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="J/61Ilxm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236202AbiJXOWm (ORCPT + 99 others); Mon, 24 Oct 2022 10:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235982AbiJXOTW (ORCPT ); Mon, 24 Oct 2022 10:19:22 -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 B62FF94116; Mon, 24 Oct 2022 05:57:08 -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 1ED84612B2; Mon, 24 Oct 2022 12:42:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32432C433C1; Mon, 24 Oct 2022 12:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615345; bh=+6nKuQUQQhp/DPGhaTRSC6cZh6rw96mQOZjAlDCFnuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/61IlxmHw4zshUIAwtM29OHglqaxv+DBFY+itEI2CVgW1dVjCCJ+o/7c+Onlvtiv O68x6F2h9j5Pz61v0nkx/eyIMgjM+K6tt/nq/11HqD5iO1nYGH5WbbGSMsO40TDeHI 8kTRHTttSXRSdYVuSiaUd0uU3PpXk4P1X2kVygnk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Rob Herring , Daniel Vetter , Sasha Levin Subject: [PATCH 5.15 215/530] drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node() Date: Mon, 24 Oct 2022 13:29:19 +0200 Message-Id: <20221024113054.814419464@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747579489984060375?= X-GMAIL-MSGID: =?utf-8?q?1747579489984060375?= From: Liang He [ Upstream commit e0686dc6f2252e009c455fe99e2ce9d62a60eb47 ] The reference 'child' in the iteration of for_each_available_child_of_node() is only escaped out into a local variable which is only used to check its value. So we still need to the of_node_put() when breaking of the for_each_available_child_of_node() which will automatically increase and decrease the refcount. Fixes: ca454bd42dc2 ("drm/pl111: Support the Versatile Express") Signed-off-by: Liang He Reviewed-by: Rob Herring Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20220711131550.361350-1-windhl@126.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/pl111/pl111_versatile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c index bdd883f4f0da..963a5d5e6987 100644 --- a/drivers/gpu/drm/pl111/pl111_versatile.c +++ b/drivers/gpu/drm/pl111/pl111_versatile.c @@ -402,6 +402,7 @@ static int pl111_vexpress_clcd_init(struct device *dev, struct device_node *np, if (of_device_is_compatible(child, "arm,pl111")) { has_coretile_clcd = true; ct_clcd = child; + of_node_put(child); break; } if (of_device_is_compatible(child, "arm,hdlcd")) {