From patchwork Wed Oct 19 08:27:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp283229wrs; Wed, 19 Oct 2022 05:04:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5dAvUbfPHyMKzwOBcmERj4zha16kMmMIcDFNInv/A9PAaQd9jlKYK8TRkq+6FYmvpRv05l X-Received: by 2002:a17:906:9c83:b0:779:c14c:55e4 with SMTP id fj3-20020a1709069c8300b00779c14c55e4mr6244785ejc.619.1666181060719; Wed, 19 Oct 2022 05:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666181060; cv=none; d=google.com; s=arc-20160816; b=dNzjpf1IKbGumJJx6zRMk4LktkBZAJeBEjHQ8k+Z8vo3AXtgwW3eThuk8pBPGqYUXO mkJd/I7372brb1cZstwZsKRELjdu22v7V68W0q1o2cNYdvNDl+Enp4zPweL6f81uys0u 4QVcMbx/BHE92xrNlPtpyU1b/P5MQvKyHHRLncnGTr+YYKCBuuWypOSgu1MreCJ6TJC2 zHcil1fdioqDN54K5pWKiNMwyxW9UZu/UpUqaon/l/ABWnH+Wbv/ru+7y+Zn/q+SDXJB AAvL1tYqnzJwmw1Y0kKEggOl7biQ2ga+id8wmxvFbTXTtBE6d1kNknlBErkM6dSUidsb 0Hhw== 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 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.03.55; Wed, 19 Oct 2022 05:04: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=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 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?1747117472203763664?= X-GMAIL-MSGID: =?utf-8?q?1747117472203763664?= 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");