Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp948009rwi; Wed, 19 Oct 2022 05:05:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kcVXZYK0L8XKd2aLirMIXW4aZy3sX/cEmmiJNl3gmt/UerLtvnmkNFU3Yk7ByTwtkf2wM X-Received: by 2002:aa7:dc10:0:b0:440:b446:c0cc with SMTP id b16-20020aa7dc10000000b00440b446c0ccmr7097287edu.34.1666181151067; Wed, 19 Oct 2022 05:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666181151; cv=none; d=google.com; s=arc-20160816; b=Kqz9/168qi0do94CyBK0CdqJ8E23+tfGvcF5XVtHFqUvaVR+0kpTaPPAO9QqcFoXCC WkecxxEVMT4oY77dLGnftKM2oLCEkXI6LLt9ufEhfe1W9DSEtr6GN9kNnKoaB9JK9DC+ RtYOGv1lrnuowXAfsPq0sFR2qp0JwR771D/vk394y6TZqsDXSA3v+EmycWCd9C4avbFF v+0pU+OZkg4ayO0rS5h9/hvCFjkAXmYS5SasQ45Y5UsRrGijHKPahvNOn8g354kCsifd pnQQ9I6SlEM1bZi9FKnjzzSWEwCpOJjONoT9HKnSqLFjsprKOrROiPBo0pwiw8vCnPKo UZdw== 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=lnxDdR4fUwXlujoAvLEXf2RGpy3f9J7F02NLf2roYlU=; b=Re91bciL6uL5WrsTwwtXIFouB2GvT6x5i/epTreP0K0lrjuGEgPwpFyd5aJ7sJLcES cBA5oVl+2Zi3KnQC86gr4r7m7gbY7tMFPRhZpDqRW4t2MyUU0w5chbkaXDmnSfUGrZFA //aR1QqxDMbTRhGro3vpc3ixMGs4JH89PqFs0fpcwtX9ewBNF/kS9/ZHfPp66c3XWm1F /zuEwWFMl5h5oBCzSw4fQx3AhDRQqON92+/K4MMPDEC1aNvlxPglcN4RfpRhpVKYh+ep 0UH7cH+cePWkOfQdHyItv0Fmj+SimTJPE4sIDJCxw8MBUSyUTdvnq2GJr1p8oDswXMqU 4q/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UW739ri0; 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 mf4-20020a170906cb8400b0078e1cd71067si12210105ejb.205.2022.10.19.05.05.21; Wed, 19 Oct 2022 05:05:51 -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=UW739ri0; 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 S231864AbiJSLyd (ORCPT + 99 others); Wed, 19 Oct 2022 07:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232312AbiJSLyA (ORCPT ); Wed, 19 Oct 2022 07:54:00 -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 B04DE1ACAA1; Wed, 19 Oct 2022 04:33:02 -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 57585B823BB; Wed, 19 Oct 2022 08:54:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B711FC433C1; Wed, 19 Oct 2022 08:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169643; bh=rB+7liTz6fUSTUIeYUpesRGUTcU+4qwtivdpWxzWjnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UW739ri0f9VVT0z+fv6q001rhFUi5lw5S77u7c4w7Qg9bJn6LIsP92DqREqTIIXmF rAFG1ubTCW1ePCgRTxuumHQzoIQ4VgYOpBr7kOrNBYZ6gGOnFRJdqubyDy/ZScptni Ut8XKxyioZPOBCBPgT3xANxB0oBR8vLhbc+RWHJw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Robert Foss , Sasha Levin Subject: [PATCH 6.0 354/862] drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt() Date: Wed, 19 Oct 2022 10:27:21 +0200 Message-Id: <20221019083305.680888969@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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 From: Liang He [ Upstream commit 1d43a5120ab49f22ba6c5901ad3994e254510303 ] In anx7625_parse_dt(), 'pdata->mipi_host_node' will be assigned a new reference with of_graph_get_remote_node() which will increase the refcount of the object, correspondingly, we should call of_node_put() for the old reference stored in the 'pdata->mipi_host_node'. Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Signed-off-by: Liang He Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220719065447.1080817-1-windhl@126.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index d1f1d525aeb6..79fc7a50b497 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1642,6 +1642,7 @@ static int anx7625_parse_dt(struct device *dev, anx7625_get_swing_setting(dev, pdata); pdata->is_dpi = 0; /* default dsi mode */ + of_node_put(pdata->mipi_host_node); pdata->mipi_host_node = of_graph_get_remote_node(np, 0, 0); if (!pdata->mipi_host_node) { DRM_DEV_ERROR(dev, "fail to get internal panel.\n"); -- 2.35.1