mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jeff Johnson <jjohnson@kernel.org>,
	<linux-wireless@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Balamurugan S <quic_bselvara@quicinc.com>,
	P Praneesh <quic_ppranees@quicinc.com>
Subject: Re: [PATCH v8 08/13] wifi: ath12k: add AHB driver support for IPQ5332
Date: Thu, 6 Mar 2025 00:14:09 +0530	[thread overview]
Message-ID: <0b0d9e1e-b968-4ffa-8f61-4ac2c02de3c3@quicinc.com> (raw)
In-Reply-To: <20250228184214.337119-9-quic_rajkbhag@quicinc.com>

On 3/1/2025 12:12 AM, Raj Kumar Bhagat wrote:
> +static int ath12k_ahb_probe(struct platform_device *pdev)
> +{
> +	struct ath12k_base *ab;
> +	const struct ath12k_hif_ops *hif_ops;
> +	enum ath12k_hw_rev hw_rev;
> +	u32 addr;
> +	int ret;
> +
> +	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> +	if (ret) {
> +		dev_err(&pdev->dev, "Failed to set 32-bit coherent dma\n");
> +		return ret;
> +	}
> +
> +	ab = ath12k_core_alloc(&pdev->dev, sizeof(struct ath12k_ahb),
> +			       ATH12K_BUS_AHB);
> +	if (!ab)
> +		return -ENOMEM;
> +
> +	hw_rev = (enum ath12k_hw_rev)of_device_get_match_data(&pdev->dev);
> +	switch (hw_rev) {
> +	case ATH12K_HW_IPQ5332_HW10:
> +		hif_ops = &ath12k_ahb_hif_ops_ipq5332;
> +		break;
> +	default:
> +		return -EOPNOTSUPP;
> +	}

The ab should be freed before returning.
Will fix this memory leak in next version (v9).

  parent reply	other threads:[~2025-03-05 18:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 18:42 [PATCH v8 00/13] wifi: ath12k: add Ath12k " Raj Kumar Bhagat
2025-02-28 18:42 ` [PATCH v8 01/13] dt-bindings: net: wireless: describe the ath12k AHB module " Raj Kumar Bhagat
2025-02-28 18:42 ` [PATCH v8 02/13] wifi: ath12k: fix incorrect CE addresses Raj Kumar Bhagat
2025-03-01  5:07   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 03/13] wifi: ath12k: refactor ath12k_hw_regs structure Raj Kumar Bhagat
2025-03-01  5:08   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 04/13] wifi: ath12k: add ath12k_hw_params for IPQ5332 Raj Kumar Bhagat
2025-03-01  5:09   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 05/13] wifi: ath12k: avoid m3 firmware download in AHB device IPQ5332 Raj Kumar Bhagat
2025-03-01  5:10   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 06/13] wifi: ath12k: Add hw_params to remap CE register space for IPQ5332 Raj Kumar Bhagat
2025-03-01  5:12   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 07/13] wifi: ath12k: add support for fixed QMI firmware memory Raj Kumar Bhagat
2025-03-01  5:13   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 08/13] wifi: ath12k: add AHB driver support for IPQ5332 Raj Kumar Bhagat
2025-03-01  5:14   ` Vasanthakumar Thiagarajan
2025-03-05 18:44   ` Raj Kumar Bhagat [this message]
2025-02-28 18:42 ` [PATCH v8 09/13] wifi: ath12k: Power up root PD Raj Kumar Bhagat
2025-03-01  5:15   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 10/13] wifi: ath12k: Register various userPD interrupts and save SMEM entries Raj Kumar Bhagat
2025-03-01  5:16   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 11/13] wifi: ath12k: Power up userPD Raj Kumar Bhagat
2025-03-01  5:18   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 12/13] wifi: ath12k: Power down userPD Raj Kumar Bhagat
2025-03-01  5:19   ` Vasanthakumar Thiagarajan
2025-02-28 18:42 ` [PATCH v8 13/13] wifi: ath12k: enable ath12k AHB support Raj Kumar Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b0d9e1e-b968-4ffa-8f61-4ac2c02de3c3@quicinc.com \
    --to=quic_rajkbhag@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jjohnson@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_bselvara@quicinc.com \
    --cc=quic_ppranees@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®