[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e05719c5-15b8-4ee7-85a3-5dd9d00f5b0e@quicinc.com>
Date: Tue, 4 Feb 2025 21:46:28 +0530
From: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, <ath12k@...ts.infradead.org>
CC: <linux-wireless@...r.kernel.org>, Kalle Valo <kvalo@...nel.org>,
"Rob
Herring" <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
"Conor
Dooley" <conor+dt@...nel.org>,
Jeff Johnson <jjohnson@...nel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
"Sowmiya Sree
Elavalagan" <quic_ssreeela@...cinc.com>
Subject: Re: [PATCH v5 09/13] wifi: ath12k: Power up root PD
On 1/30/2025 1:28 PM, Krzysztof Kozlowski wrote:
> On 30/01/2025 05:35, Raj Kumar Bhagat wrote:
>> +
>> +static void ath12k_ahb_unregister_rproc_notifier(struct ath12k_base *ab)
>> +{
>> + struct ath12k_ahb *ab_ahb = ath12k_ab_to_ahb(ab);
>> +
>> + if (!ab_ahb->root_pd_notifier) {
>> + ath12k_err(ab, "Rproc notifier not registered\n");
>> + return;
>> + }
>> +
>> + qcom_unregister_ssr_notifier(ab_ahb->root_pd_notifier,
>> + &ab_ahb->root_pd_nb);
>> + ab_ahb->root_pd_notifier = NULL;
>> +}
>> +
>> +static int ath12k_ahb_get_rproc(struct ath12k_base *ab)
>> +{
>> + struct ath12k_ahb *ab_ahb = ath12k_ab_to_ahb(ab);
>> + struct device *dev = ab->dev;
>> + struct device_node *np;
>> + struct rproc *prproc;
>> +
>> + np = of_parse_phandle(dev->of_node, "qcom,rproc", 0);
>> + if (!np) {
>> + ath12k_err(ab, "failed to get q6_rproc handle\n");
>> + return -ENOENT;
>> + }
>> +
>> + prproc = rproc_get_by_phandle(np->phandle);
>> + if (!prproc)
>
> Nothing improved here - you still leak the reference.
>
Thanks, will take care of np refcount leak in next version.
>> + return dev_err_probe(&ab->pdev->dev, -EPROBE_DEFER,
>> + "failed to get rproc\n");
>> +
>> + ab_ahb->tgt_rproc = prproc;
>
> And here.
>
Thanks, will handle rproc refcount leak.
Powered by blists - more mailing lists