From: Arnd Bergmann <[email protected]>
The return code has no initializer:
drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
Make it return -ENOMEM for allocation failures and remove the unused
variable instead.
Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/net/wireless/ath/ath12k/mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index f2f7b2a60261..e93475ae8d07 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -7965,7 +7965,7 @@ int ath12k_mac_allocate(struct ath12k_base *ab)
{
struct ath12k_hw *ah;
struct ath12k_pdev_map pdev_map[MAX_RADIOS];
- int ret, i, j;
+ int i, j;
u8 radio_per_hw;
if (test_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags))
@@ -8003,5 +8003,5 @@ int ath12k_mac_allocate(struct ath12k_base *ab)
ab->ah[i] = NULL;
}
- return ret;
+ return -ENOMEM;
}
--
2.39.2
On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
> Arnd Bergmann <[email protected]> wrote:
>
>> The return code has no initializer:
>>
>> drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>>
>> Make it return -ENOMEM for allocation failures and remove the unused
>> variable instead.
>>
>> Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> Signed-off-by: Kalle Valo <[email protected]>
>
> Nathan already fixed this:
>
> https://git.kernel.org/kvalo/ath/c/04edb5dc68f4
>
> Patch set to Rejected.
Ok, sounds good. Nathan's patch looks fine to me, but
I see it's not in linux-next yet as of today.
Arnd
"Arnd Bergmann" <[email protected]> writes:
> On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
>> Arnd Bergmann <[email protected]> wrote:
>>
>>> The return code has no initializer:
>>>
>>> drivers/net/wireless/ath/ath12k/mac.c:8006:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>>>
>>> Make it return -ENOMEM for allocation failures and remove the unused
>>> variable instead.
>>>
>>> Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw")
>>> Signed-off-by: Arnd Bergmann <[email protected]>
>>> Signed-off-by: Kalle Valo <[email protected]>
>>
>> Nathan already fixed this:
>>
>> https://git.kernel.org/kvalo/ath/c/04edb5dc68f4
>>
>> Patch set to Rejected.
>
> Ok, sounds good. Nathan's patch looks fine to me
Great, thanks for checking.
> but I see it's not in linux-next yet as of today.
Yeah, it's a problem that ath.git is not included linux-next builds. The
commits will be in linux-next only after ath-next is pulled to
wireless-next :/
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
On Wed, Feb 14, 2024, at 11:44, Kalle Valo wrote:
> "Arnd Bergmann" <[email protected]> writes:
>> On Wed, Feb 14, 2024, at 09:44, Kalle Valo wrote:
>>> Arnd Bergmann <[email protected]> wrote:
>
>> but I see it's not in linux-next yet as of today.
>
> Yeah, it's a problem that ath.git is not included linux-next builds. The
> commits will be in linux-next only after ath-next is pulled to
> wireless-next :/
Not sure if that is intentional, but if you'd like to change
that, you can just email Stephen Rothwell asking him to include
ath-next into linux-next as well.
Arnd