From: Neil Armstrong <narmstrong@baylibre.com>
To: Liang He <windhl@126.com>,
kishon@ti.com, khilman@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com,
linux-phy@lists.infradead.org
Cc: "open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: amlogic: phy-meson-axg-mipi-pcie-analog: Hold reference returned by of_get_parent()
Date: Tue, 5 Jul 2022 09:21:49 +0200 [thread overview]
Message-ID: <e2746084-ee88-7dc6-afd5-0d0dca4723c4@baylibre.com> (raw)
In-Reply-To: <20220705021526.281441-1-windhl@126.com>
+ 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 <windhl@126.com>
> ---
> 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-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next parent reply other threads:[~2022-07-05 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220705021526.281441-1-windhl@126.com>
2022-07-05 7:21 ` Neil Armstrong [this message]
2022-07-25 19:41 ` Martin Blumenstingl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2746084-ee88-7dc6-afd5-0d0dca4723c4@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=kishon@ti.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=windhl@126.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®