Re: [PATCH v5 09/13] wifi: ath12k: Power up root PD
From: Krzysztof Kozlowski
Date: Thu Jan 30 2025 - 02:58:50 EST
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