[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0b0d9e1e-b968-4ffa-8f61-4ac2c02de3c3@quicinc.com>
Date: Thu, 6 Mar 2025 00:14:09 +0530
From: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>
To: <ath12k@...ts.infradead.org>
CC: Johannes Berg <johannes@...solutions.net>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Jeff Johnson <jjohnson@...nel.org>,
<linux-wireless@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Balamurugan S
<quic_bselvara@...cinc.com>,
P Praneesh <quic_ppranees@...cinc.com>
Subject: Re: [PATCH v8 08/13] wifi: ath12k: add AHB driver support for IPQ5332
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).
Powered by blists - more mailing lists