[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02d3f555-c2e9-40ed-8695-8ae7f260e259@kernel.org>
Date: Thu, 30 Jan 2025 08:58:35 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>, 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 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.
> + return dev_err_probe(&ab->pdev->dev, -EPROBE_DEFER,
> + "failed to get rproc\n");
> +
> + ab_ahb->tgt_rproc = prproc;
And here.
> +
> + return 0;
> +}
Best regards,
Krzysztof
Powered by blists - more mailing lists