From: Johannes Berg The code allocates the bitrates twice, but really only should do that once. Remove the unconditional allocation even though it's the same in both branches of the switch, since the cleanup only handles those two branches explicitly. Signed-off-by: Johannes Berg --- net/mac80211/tests/util.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/mac80211/tests/util.c b/net/mac80211/tests/util.c index 0b01264af577..89ff4f389de3 100644 --- a/net/mac80211/tests/util.c +++ b/net/mac80211/tests/util.c @@ -2,7 +2,7 @@ /* * Utilities for mac80211 unit testing * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024, 2026 Intel Corporation */ #include #include @@ -226,10 +226,6 @@ int t_sdata_init(struct kunit_resource *resource, void *ctx) sband = t_sdata->wiphy->bands[band]; sband->band = band; - sband->bitrates = - kmemdup(bitrates, sizeof(bitrates), GFP_KERNEL); - sband->n_bitrates = ARRAY_SIZE(bitrates); - /* Initialize channels, feel free to add more channels/bands */ switch (band) { case NL80211_BAND_2GHZ: -- 2.55.0