Free country code map buffer when adapter is removed.
Bug
200143482
Change-Id: Iab82b3b56ec07a99a3d3012b2931c51ddecbc502
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/817916
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
adapter->n_country = 0;
return -1;
}
+
+static void wifi_platform_free_country_code_map(wifi_adapter_info_t *adapter)
+{
+ if (adapter->country_code_map) {
+ kfree(adapter->country_code_map);
+ adapter->country_code_map = NULL;
+ }
+ adapter->n_country = 0;
+}
#endif
static int wifi_plat_dev_drv_probe(struct platform_device *pdev)
#endif /* BCMPCIE */
}
+#ifdef NV_COUNTRY_CODE
+ wifi_platform_free_country_code_map(adapter);
+#endif
sysedp_free_consumer(adapter->sysedpc);
adapter->sysedpc = NULL;