Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2928898rwb; Mon, 15 Aug 2022 14:14:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ELgW492wGMN22iBMC5y+QFCEpZ773BXkPCpcbrOx5KB7FXC762FDmNOxlgRGLlR65W4cA X-Received: by 2002:a05:6402:1e8d:b0:441:58db:b6a2 with SMTP id f13-20020a0564021e8d00b0044158dbb6a2mr15625048edf.277.1660598072885; Mon, 15 Aug 2022 14:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598072; cv=none; d=google.com; s=arc-20160816; b=YDvvmllud+33i8zI3E9pQeIVvYAMoAAa3AU34AKR7EyHVKyb2znuS1uYWNInbaVtfD 428BjZM1EVc72LBpwEmM9yBXzjBlpMNAxFipZmgIwtVWbt3p5Dk3UaK+cr2wq8w/+srY Grp7gSqjFfNHdgmE6NS5e1wqGjlt6C248Nb+51v3CwVvXm9UY6Lk5RmQHWYgmutk2UAI YucNP70FcKeHdRDIgMYdpJmdMhVor2sjW9g+SCfsWBrJ/LMbPxm0AJ9blgHX9M8NYPN6 Ca2JTfrEgIbSHOYIvwpCwGb91BqjSnfVmdmSnKbPEs1wEOXRlGo21GJC6wJE847lniRl ELkA== 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=z3rZ9kjRJWK+05earjUjnN8n3SHGwbbkJvQ+U6ka2s3Cl+tUiTq43JWp/j28gbZwOx tZPJ1XE39U63sTZz+C12YhqRK+4bKouyNexk15KXxuHcD+Q6G59XcFrs+ZaRUsEjDnuW OREswQXdoGVOphNYFCzCU7NUyKF7uhazCzfov3uI2edrDqq453TP/OasYxx4XDp/uwNg fJyzQMz1+S9D7NbmStYJ8KFW/QPEa/YhomPezsO8vyfeAj8CGnzADLzZKuN1AHYrjjsn /72YrzbfZDSn6+ksXc8EMQ+H4B/6PuQFjmHRZLcLmkxKzvLMouHCB0U3UEK/U/eJ5IEb t+uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qadc7zT1; 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 fi20-20020a056402551400b00443e8428b01si1333798edb.508.2022.08.15.14.14.07; Mon, 15 Aug 2022 14:14:32 -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=Qadc7zT1; 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 S244221AbiHOUz2 (ORCPT + 99 others); Mon, 15 Aug 2022 16:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346677AbiHOUyP (ORCPT ); Mon, 15 Aug 2022 16:54:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1379CBE4D5; Mon, 15 Aug 2022 12:11:03 -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 44F3BB810A3; Mon, 15 Aug 2022 19:10:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D0C9C433C1; Mon, 15 Aug 2022 19:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590644; bh=bwO1Mm4K1TDzi0Wmw7DeJjExMDBZD3OMknw3wAmxiZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qadc7zT1/V6qERdkAcoFH7MR09tW2vtqgYeL6I982X6GLTW81bAS8z9QP4b2zSQ/7 QiZ5J80AuPTAmh7U/Om1gxWDvqtO+vz/8ZDLrUWmhUwFHkdU5TyIYWs2++0oaQ5B3k 4J42hAZl3vFezddTUdIUbNpO22SRB79eQDM9sYgg= 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.18 0324/1095] drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init Date: Mon, 15 Aug 2022 19:55:23 +0200 Message-Id: <20220815180443.193159994@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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