Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091205rwb; Mon, 15 Aug 2022 17:54:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sAfe4yQAhVhbqgNdjT/JaWIY0PVtpbM/bA+XjoCteBtg47BjpbUE9otNO3QvHW6N0iNZ7 X-Received: by 2002:aa7:dc0d:0:b0:443:e1ca:bdb1 with SMTP id b13-20020aa7dc0d000000b00443e1cabdb1mr4185289edu.62.1660611290324; Mon, 15 Aug 2022 17:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611290; cv=none; d=google.com; s=arc-20160816; b=B8lM6K1A4XKMQsrFgGqzkUtTHs9iyuyqfgPlKCupUcrrYs0bSy4lSd+ECjLq/bWdUt +KX3AMUXfQHZm3kfPPNBt+1p3+YaV20bVsz0CVyO4Rj588C2v5oORFTSQuZW1n2hPCQn ZgAW6Yd+ch1JIS03ZVYyfoA55Y089YAOlM86e5Dw+h8ovewL+5qEtMvWhAInzGXa2oTU fBRnZQonksEvk/0x+2SiYdbcEvZEGdVw5KOSLKaD1sl581gsluoggHyqkFaDCjCYEoW5 5e+wewskDvOGYWpiZmao1F+aZ6xhxQYC4SW6fTq9S2a+lt6CRPaYwD8+smWACs2aYeVi lf+w== 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=r1O22B6+/5vJL5bbbA0bf3AYuTgCiYvjUylpU/AajnA=; b=dmUEETQxSTvJS9lDc3fVGGJ1A8TBenXy5qPkRvH/WQqWsbIJKUZreUSxh+PBqOP2zH eJwVa1smW82S++lHKl7bJ+NhtFv5staaPxIgq73Dn7GaU5aEUL7dmI+3cyDLHetqNh33 GCT+pYleZFAnAxPZ7H/h7fuJDRKN3FRzfnndP4w6OpiJeK801Ijy/P/BTf8/dwH8pB5o +fah4qdUSGqcbB1JpOeygF/0obRZvqhqg/2PVoQdtxMNR7xVqyVIKFZk/to0FL39UMJ0 LYX5iNdD9mQPhU9Z6h2GaZce+IddOXgo2D8m74hFfZ9JBsuBGRG0R9JfODR1kQUegq5w RVrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dfZdGd06; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn23-20020a1709070d1700b00732fcbcfedesi8891311ejc.623.2022.08.15.17.54.23; Mon, 15 Aug 2022 17:54:50 -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=dfZdGd06; 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 S1346656AbiHOXa5 (ORCPT + 99 others); Mon, 15 Aug 2022 19:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245140AbiHOXZB (ORCPT ); Mon, 15 Aug 2022 19:25:01 -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 BF7BF14C364; Mon, 15 Aug 2022 13:05:55 -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 6F4DFB80EAB; Mon, 15 Aug 2022 20:05:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0B82C433D6; Mon, 15 Aug 2022 20:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593953; bh=bwO1Mm4K1TDzi0Wmw7DeJjExMDBZD3OMknw3wAmxiZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dfZdGd06xgRXzSOlMFHZ9dT9wgUBA0P1grKfSYFHhRfWy+dUw6j3KeHHv9p9Hwg2E k5F6ik7eS/2MnISIiQM30vxJYaCd99sWfLzMdVQS05tIosi69sQOXTTIFQt5yjeLC0 J6cxdE3lX33AfFM19/PYWuU3gsCarmiZd8chK01c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Martin Blumenstingl , Neil Armstrong , Sasha Levin Subject: [PATCH 5.19 0340/1157] drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init Date: Mon, 15 Aug 2022 19:54:56 +0200 Message-Id: <20220815180453.279858424@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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 From: Miaoqian Lin [ Upstream commit 7d255ddbbf679aa47e041cbf68520fd985ed2279 ] of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 318ba02cd8a8 ("drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220601033927.47814-2-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/meson/meson_encoder_cvbs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c index fd8db97ba8ba..8110a6e39320 100644 --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c @@ -238,6 +238,7 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) } meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote); + of_node_put(remote); if (!meson_encoder_cvbs->next_bridge) { dev_err(priv->dev, "Failed to find CVBS Connector bridge\n"); return -EPROBE_DEFER; -- 2.35.1