From patchwork Wed Oct 19 08:27:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5055 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp247971wrs; Wed, 19 Oct 2022 03:42:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4f9GTKZ3VQ5ZGYFOzGsYeSNa1J87kEnnIhJU4u/uKCrLSnt4g1agQpa86HPyWqRLNAJKMU X-Received: by 2002:aa7:cd92:0:b0:456:cbb5:2027 with SMTP id x18-20020aa7cd92000000b00456cbb52027mr6802151edv.384.1666176140393; Wed, 19 Oct 2022 03:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176140; cv=none; d=google.com; s=arc-20160816; b=pt64xSxUPod9t0Ge1iZucQKasTAy23QA3a1HNPBRh1Mhf5oIOHPF2CKqxzbPLIKKHw ivKhx93Pcv7z2NaAA0ALDqUdWVcp5NVyI2+T6YvVJ0YZ3mHyoxllkM8zbZaX95awPlnR i5Nh2eDULcz65UI12CbLr+/rHmEh4dn4xa29k/FHpyVSyrVPRmimjkDzgrhr9NBmLoss c9HiQzYMjof2q9IneUttpIH5antOmHiKSPTY2xKsLuNvEGVlD41461sqY2WQrHGlc+XR XP3cFugntFrK2Q7ze4upY56fwwxmMOd8aMBqjo31L2ItnBx9nIpWWAeIf6PHq4EUbf8h PoCg== 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=25iHbbcUvyHSEHlFZR4HUcoLs6DKzUBsviI7qRRHgBw=; b=zW+LZZSpVWo5Dk6XvgQu3j3QihbKfKa5MGdgMJbJsBB8U0etoXFddigaV7/dbdJ/pG 57a9jjM5wDVKmJP1Qg1i7q+QWKnHqJF67UPiO9gtnFf/PLVvg9rsWoluhX20KJh9vh6p sMzVpgq+SV2lMgD8VkzJ5iVaAQizg575E5y5UG5AhS/rN1/b5U7aWPoAOfZ+YdrXermq etNZaBqDNOcCN9Ai+1492a7jUq3OjnH7t4y3kBDBH38S7zay6PNR3IXYCIP7llA2Cay5 SBTYM9gNH7ftQPvTp/uryOKR+X6bwfxBqLzG1y5HydcY8EEAeqvB1wcJcDyeCmLOULpp VJpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ny0BWUwt; 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 hq10-20020a1709073f0a00b0078a9cbab78asi15626654ejc.738.2022.10.19.03.41.54; Wed, 19 Oct 2022 03:42:20 -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=Ny0BWUwt; 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 S232181AbiJSKlQ (ORCPT + 99 others); Wed, 19 Oct 2022 06:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbiJSKkP (ORCPT ); Wed, 19 Oct 2022 06:40:15 -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 36175157455; Wed, 19 Oct 2022 03:18:47 -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 CFB66B823BE; Wed, 19 Oct 2022 08:54:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AE7EC433D6; Wed, 19 Oct 2022 08:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169658; bh=YcVYeCCWSGIsznKuEIKIJtlRsY/01E416pCnfLTIunY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ny0BWUwtYxhofzD4h00rD7/lv+wqF/QcKdYsJcd21gt1Y28II+Db/QtljQHvcEbja N47jdfMZsTfHhXldiZtPHaOkjd7N8cu98WNME+PyzlBNNLGhZjl9fZIKvqskkCUhrW BtKepSpAZLJvVit3siU0SAGQ0FXkaAGHrfcRTpXM= 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 6.0 359/862] drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node() Date: Wed, 19 Oct 2022 10:27:26 +0200 Message-Id: <20221019083305.866063002@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747112312523676571?= X-GMAIL-MSGID: =?utf-8?q?1747112312523676571?= 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 efb01a554574..1b436b75fd39 100644 --- a/drivers/gpu/drm/pl111/pl111_versatile.c +++ b/drivers/gpu/drm/pl111/pl111_versatile.c @@ -404,6 +404,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")) {