Skip to content

Commit 4bc0eb3

Browse files
committed
Merge tag 'wireless-drivers-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says: ==================== wireless-drivers fixes for 4.6 b43 * fix memory leaks when removing the device bcma * fix building without OF_IRQ rtlwifi * fix gcc-6 indentation warning iwlwifi * lower the debug level of a benign print * fix a memory leak ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 1ecf689 + 15da5d1 commit 4bc0eb3

File tree

6 files changed

+15
-22
lines changed

6 files changed

+15
-22
lines changed

drivers/bcma/main.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ static bool bcma_is_core_needed_early(u16 core_id)
136136
return false;
137137
}
138138

139-
#if defined(CONFIG_OF) && defined(CONFIG_OF_ADDRESS)
140139
static struct device_node *bcma_of_find_child_device(struct platform_device *parent,
141140
struct bcma_device *core)
142141
{
@@ -184,7 +183,7 @@ static unsigned int bcma_of_get_irq(struct platform_device *parent,
184183
struct of_phandle_args out_irq;
185184
int ret;
186185

187-
if (!parent || !parent->dev.of_node)
186+
if (!IS_ENABLED(CONFIG_OF_IRQ) || !parent || !parent->dev.of_node)
188187
return 0;
189188

190189
ret = bcma_of_irq_parse(parent, core, &out_irq, num);
@@ -202,23 +201,15 @@ static void bcma_of_fill_device(struct platform_device *parent,
202201
{
203202
struct device_node *node;
204203

204+
if (!IS_ENABLED(CONFIG_OF_IRQ))
205+
return;
206+
205207
node = bcma_of_find_child_device(parent, core);
206208
if (node)
207209
core->dev.of_node = node;
208210

209211
core->irq = bcma_of_get_irq(parent, core, 0);
210212
}
211-
#else
212-
static void bcma_of_fill_device(struct platform_device *parent,
213-
struct bcma_device *core)
214-
{
215-
}
216-
static inline unsigned int bcma_of_get_irq(struct platform_device *parent,
217-
struct bcma_device *core, int num)
218-
{
219-
return 0;
220-
}
221-
#endif /* CONFIG_OF */
222213

223214
unsigned int bcma_core_irq(struct bcma_device *core, int num)
224215
{

drivers/net/wireless/broadcom/b43/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5680,11 +5680,12 @@ static int b43_bcma_probe(struct bcma_device *core)
56805680
INIT_WORK(&wl->firmware_load, b43_request_firmware);
56815681
schedule_work(&wl->firmware_load);
56825682

5683-
bcma_out:
56845683
return err;
56855684

56865685
bcma_err_wireless_exit:
56875686
ieee80211_free_hw(wl->hw);
5687+
bcma_out:
5688+
kfree(dev);
56885689
return err;
56895690
}
56905691

@@ -5712,8 +5713,8 @@ static void b43_bcma_remove(struct bcma_device *core)
57125713
b43_rng_exit(wl);
57135714

57145715
b43_leds_unregister(wl);
5715-
57165716
ieee80211_free_hw(wl->hw);
5717+
kfree(wldev->dev);
57175718
}
57185719

57195720
static struct bcma_driver b43_bcma_driver = {
@@ -5796,6 +5797,7 @@ static void b43_ssb_remove(struct ssb_device *sdev)
57965797

57975798
b43_leds_unregister(wl);
57985799
b43_wireless_exit(dev, wl);
5800+
kfree(dev);
57995801
}
58005802

58015803
static struct ssb_driver b43_ssb_driver = {

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,8 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
11471147
/* the fw is stopped, the aux sta is dead: clean up driver state */
11481148
iwl_mvm_del_aux_sta(mvm);
11491149

1150+
iwl_free_fw_paging(mvm);
1151+
11501152
/*
11511153
* Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
11521154
* won't be called in this case).

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,6 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
761761
for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
762762
kfree(mvm->nvm_sections[i].data);
763763

764-
iwl_free_fw_paging(mvm);
765-
766764
iwl_mvm_tof_clean(mvm);
767765

768766
ieee80211_free_hw(mvm->hw);

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,8 @@ static int iwl_pcie_rsa_race_bug_wa(struct iwl_trans *trans)
732732
*/
733733
val = iwl_read_prph(trans, PREG_AUX_BUS_WPROT_0);
734734
if (val & (BIT(1) | BIT(17))) {
735-
IWL_INFO(trans,
736-
"can't access the RSA semaphore it is write protected\n");
735+
IWL_DEBUG_INFO(trans,
736+
"can't access the RSA semaphore it is write protected\n");
737737
return 0;
738738
}
739739

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,9 +2488,9 @@ void rtl8821ae_dm_txpower_tracking_callback_thermalmeter(
24882488
for (p = RF90_PATH_A; p < MAX_PATH_NUM_8821A; p++)
24892489
rtldm->swing_idx_ofdm_base[p] = rtldm->swing_idx_ofdm[p];
24902490

2491-
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
2492-
"pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n",
2493-
rtldm->thermalvalue, thermal_value);
2491+
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
2492+
"pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n",
2493+
rtldm->thermalvalue, thermal_value);
24942494
/*Record last Power Tracking Thermal Value*/
24952495
rtldm->thermalvalue = thermal_value;
24962496
}

0 commit comments

Comments
 (0)