[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57251e6c-a5e7-2388-f30e-365c56b52a42@collabora.com>
Date: Thu, 10 Mar 2022 15:48:39 +0100
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Miaoqian Lin <linmq006@...il.com>,
Ryder Lee <ryder.lee@...iatek.com>,
Jianjun Wang <jianjun.wang@...iatek.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Chuanjia Liu <chuanjia.liu@...iatek.com>,
linux-pci@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] PCI: mediatek: Fix refcount leak in
mtk_pcie_subsys_powerup
Il 09/03/22 10:19, Miaoqian Lin ha scritto:
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
>
> Fixes: 87e8657ba99c ("PCI: mediatek: Add new method to get shared pcie-cfg base address")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> Reviewed-by: Miles Chen <miles.chen@...iatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
> drivers/pci/controller/pcie-mediatek.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> index ddfbd4aebdec..be8bd919cb88 100644
> --- a/drivers/pci/controller/pcie-mediatek.c
> +++ b/drivers/pci/controller/pcie-mediatek.c
> @@ -1008,6 +1008,7 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
> "mediatek,generic-pciecfg");
> if (cfg_node) {
> pcie->cfg = syscon_node_to_regmap(cfg_node);
> + of_node_put(cfg_node);
> if (IS_ERR(pcie->cfg))
> return PTR_ERR(pcie->cfg);
> }
>
Powered by blists - more mailing lists