From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57B61C433EF for ; Tue, 5 Jul 2022 07:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:Cc:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Kqtf1Ck5qtO2BzMnHdijEkNFxNffDHnggLa0FX/TyXA=; b=3vANJYE7KghspM 96nN5fiUHs79+wQ0wikenXiew7peEKnZ+4qNtFXwuVaALzYCGWE0LP4FHna2lxGwrwL9wkGX9m8EM z53IaGVxcnpJLU/uZdnks33vWGZfeyNf7m9bOv0GLw24bfsqm5C5VujMwI7e3n+d4p5zuJFIqbna+ afc7yW6shmLm1tzCHZZWPHBX84VFH09lQvUndQyKA0qdeMvFbO0i6w3Kl+Vpils2tpySxLVBTxRAc KRfSKnxRfp0nC6tFCblSAdKrdg7Zpbi5IZCl3HaKs5Bv+TNP+3SIOX1i+OwuJ9QSMO1mmRD5s3ZiA 8hjUkRvVPZfwInv9nlZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8csb-00FXWQ-PJ; Tue, 05 Jul 2022 07:21:53 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8csZ-00FXMQ-Pf for linux-phy@lists.infradead.org; Tue, 05 Jul 2022 07:21:53 +0000 Received: by mail-wr1-x42e.google.com with SMTP id o4so16201170wrh.3 for ; Tue, 05 Jul 2022 00:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:cc:from:organization:in-reply-to :content-transfer-encoding; bh=jup5yi9H7xUYGePSxxyktmglyW6uLEzBdr9VBRZBloA=; b=LzyC1BslQcQDLwEh59d9Kfgx2N20Ze+0hRqNNCPsWakeskMfJdQfZpxWmWtA34cHFT xgCbDp7n8a0oIe1/vz3FeCy7qd2GKvBrFEX5HnGSTOq894MfppO6OOXFxL50ATudJ0ea tH+jsB5hb0v8JAIY4Rsu5CU+G+t1QEmxZcWmjjq24GmMTpjESFqyUWsldy7IJplbglH/ ti0+hHwePBRCkv5Or5A+COl332Bv+lcii5owVjP+aoAZACzXkasK1qn1yTg/dQC92eow oSM6DubSDEGR6PpxG6rZqbXCngI43E7+/GP1u1ILKaDV5vj7DiM7BnrlteJAEG0kTz8h tOGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:cc:from:organization:in-reply-to :content-transfer-encoding; bh=jup5yi9H7xUYGePSxxyktmglyW6uLEzBdr9VBRZBloA=; b=7hkzsCt21QA5fRLpPCtD2ez3qHAU+ZLbXGvIIQ1fu+cRhv7VXB4Hvd6z3b915f+0Hy /v1XjBLzT1l0P5PBfNP9ANK0bmzLvLledZztldmyCf2fD6sDSoQm/xhncpIFI+UFdocu IoNxOxYTKV8V7g8yGxdm67rU8KcWFLZi9yMKcr27p6erEG6rbYWL/yTVIz7C59Tza/32 Y0KxxMc+TI+OKIORK01+dalnvG6nf8U4n/DNDZXmNWJTYQtfPrFVHS4iv7umzATxVDrs u3WjWYJ1rKssSjWxbpOBuhY6RuBw1ZU//IpZbe9b8qeUgOXg1Ed5JvT10nG9mFwFpbj8 dvlA== X-Gm-Message-State: AJIora8MHrmTIvV1VstUgnTI3C7O2O3xhgxnyFesV78Zlqo1SdoHuxI1 lriNjfIaCVMyLU0Imxy025i2pA== X-Google-Smtp-Source: AGRyM1smRihRT50fdOIiQfU+V8EUtDDGx/W73L/08nARMlYF5jSo5SQ5+guiRsMa9ttFJ2BN1YUJJQ== X-Received: by 2002:a5d:598e:0:b0:21d:37df:3f2e with SMTP id n14-20020a5d598e000000b0021d37df3f2emr25254699wri.451.1657005710509; Tue, 05 Jul 2022 00:21:50 -0700 (PDT) Received: from ?IPV6:2001:861:44c0:66c0:3c4f:78be:dc90:14f9? ([2001:861:44c0:66c0:3c4f:78be:dc90:14f9]) by smtp.gmail.com with ESMTPSA id r16-20020a05600c35d000b003a0375c4f73sm22157331wmq.44.2022.07.05.00.21.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Jul 2022 00:21:50 -0700 (PDT) Message-ID: Date: Tue, 5 Jul 2022 09:21:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] phy: amlogic: phy-meson-axg-mipi-pcie-analog: Hold reference returned by of_get_parent() Content-Language: en-US To: Liang He , kishon@ti.com, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, linux-phy@lists.infradead.org References: <20220705021526.281441-1-windhl@126.com> Cc: "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Neil Armstrong Organization: Baylibre In-Reply-To: <20220705021526.281441-1-windhl@126.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_002151_905235_B9C18DF0 X-CRM114-Status: GOOD ( 16.19 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org + linux-amlogic, linux-arm-kernel, linux-kernel On 05/07/2022 04:15, Liang He wrote: > We should hold the reference returned by of_get_parent() and use it > to call of_node_put() for reference balance. > > Fixes: 8eff8b4e22d9 ("phy: amlogic: phy-meson-axg-mipi-pcie-analog: add support for MIPI DSI analog") > Signed-off-by: Liang He > --- > drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c b/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > index 1027ece6ca12..a3e1108b736d 100644 > --- a/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > +++ b/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > @@ -197,7 +197,7 @@ static int phy_axg_mipi_pcie_analog_probe(struct platform_device *pdev) > struct phy_provider *phy; > struct device *dev = &pdev->dev; > struct phy_axg_mipi_pcie_analog_priv *priv; > - struct device_node *np = dev->of_node; > + struct device_node *np = dev->of_node, *parent_np; > struct regmap *map; > int ret; > > @@ -206,7 +206,9 @@ static int phy_axg_mipi_pcie_analog_probe(struct platform_device *pdev) > return -ENOMEM; > > /* Get the hhi system controller node */ > - map = syscon_node_to_regmap(of_get_parent(dev->of_node)); > + parent_np = of_get_parent(dev->of_node); > + map = syscon_node_to_regmap(parent_np); > + of_node_put(parent_np); > if (IS_ERR(map)) { > dev_err(dev, > "failed to get HHI regmap\n"); -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy