From patchwork Sat Oct 22 07:23:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7369 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1095944wrr; Sat, 22 Oct 2022 01:03:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4jtQJtFqtsklRCxq+PWcdg6nvBtocqhZ/n2LACXvk4LpQjNqL8NK8DAh+E5h0y2Q735zcy X-Received: by 2002:a17:902:7297:b0:17f:93b5:5ecc with SMTP id d23-20020a170902729700b0017f93b55eccmr22774282pll.93.1666425834465; Sat, 22 Oct 2022 01:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425834; cv=none; d=google.com; s=arc-20160816; b=jJSlk//skE1Tj29OVSOQYujHaKCnet7fZiI69cIffAFRb+sMrrdv3dqv61Q/VcxCY7 SiKcScGHdPHpKYZQB46bNa1ZWlPWJCvTd3/I5zTrIUtyiQ2jLHNqPnQKiFXNIMJ4q47U ON4lprxwdycI5VLCpGkKdFFaxgs15lp4/yusQlSR2IFzUIlOFpNPtpx3gbh+9rLmcwXJ tUDwHxADLKkuA6R1zpSYSrSSRpVopEBEkPmORrxxbnuJ6VOn6LpNdi71j4LgnGMi2sxM CekUq69iUPlz42jsdqiEsB3dsOzFUpKPCrXWouYQqw5MTnI4GM2TqepZzX97Gvcan0IH kRdg== 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=m2yZ1La2sjlbwURkGEp9cAwRNwwAKZaL9LuU5n2xwxeW0Nquleu2VD1SEXvHfx2eoZ ddA1HmL4rHSRfuxiiNZwoIjlzYyvtfzocj+OGitIUtWZzpLzyV4RRabqr4eMjJ2NFj4B P+oKmeZDtR1sHOQg1Jyc1nSHtjMX8XcmHfiDu7N3+G3hzyT2EFBh/B0MhRZ5eoTaa3qu mP6CPPdiIEmoBYMhZg09P8lDYA1GkC9l2thmkT8dMWH2J7xdoqYjHBpIZubbGsqFM6b+ Ai1bUp912lj3JQu9TtkbYuL8M3k25ULRPhBES+vjffQ7pyQvhjLGHiZJsCy9Nxboo0WW tm8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D+WtBPoC; 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 lb1-20020a17090b4a4100b0020c060f42cbsi2575471pjb.98.2022.10.22.01.03.41; Sat, 22 Oct 2022 01:03:54 -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=D+WtBPoC; 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 S232651AbiJVIDW (ORCPT + 99 others); Sat, 22 Oct 2022 04:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232437AbiJVHy7 (ORCPT ); Sat, 22 Oct 2022 03:54:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E79D6BB2; Sat, 22 Oct 2022 00:48:21 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8824DB82E22; Sat, 22 Oct 2022 07:47:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF88BC433C1; Sat, 22 Oct 2022 07:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424860; bh=+6nKuQUQQhp/DPGhaTRSC6cZh6rw96mQOZjAlDCFnuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D+WtBPoClLlsv5bjcadVgmAlR2ZFo62A3YnZI8jwF1YS75KIws79CkpX42xChZu90 MczqqmHsaQBt1ns8qld4ytwFgjbyPnykqcESgFO3jmyYDBfjFBHutvMi8gctWqWMu4 ayTIIr6yhnL7FY2p9ds1w5mny1YnDX/yai0k8aW4= 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.19 304/717] drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node() Date: Sat, 22 Oct 2022 09:23:03 +0200 Message-Id: <20221022072506.554606120@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374135450702716?= X-GMAIL-MSGID: =?utf-8?q?1747374135450702716?= 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")) {