mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
carl9170: devres ar->survey_info
driver keeps the same survey_info struct for its lifetime around. This is used because while firmware does help by providing accounting information of the current channel, it doesn't keep track on the remaining channels. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/9b9a059b384f49587f4384ba47f01d3fb2115b22.1646250537.git.chunkeey@gmail.com
This commit is contained in:
parent
a8da65f901
commit
83fe43abda
1 changed files with 2 additions and 4 deletions
|
@ -1916,7 +1916,8 @@ static int carl9170_parse_eeprom(struct ar9170 *ar)
|
|||
if (!bands)
|
||||
return -EINVAL;
|
||||
|
||||
ar->survey = kcalloc(chans, sizeof(struct survey_info), GFP_KERNEL);
|
||||
ar->survey = devm_kcalloc(&ar->udev->dev, chans,
|
||||
sizeof(struct survey_info), GFP_KERNEL);
|
||||
if (!ar->survey)
|
||||
return -ENOMEM;
|
||||
ar->num_channels = chans;
|
||||
|
@ -2046,9 +2047,6 @@ void carl9170_free(struct ar9170 *ar)
|
|||
kfree_skb(ar->rx_failover);
|
||||
ar->rx_failover = NULL;
|
||||
|
||||
kfree(ar->survey);
|
||||
ar->survey = NULL;
|
||||
|
||||
mutex_destroy(&ar->mutex);
|
||||
|
||||
ieee80211_free_hw(ar->hw);
|
||||
|
|
Loading…
Add table
Reference in a new issue