Search Linux Wireless

Re: [PATCH v5 09/13] wifi: ath12k: Power up root PD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux