wlan: Fixed driver initialization problem in case of init error
Set 'wlan_hdd_inited' properly to reflect the actual initializaiton
status
Change-Id: Icac04a06466d52208c1904b0a97dd47584064fe8
CR-Fixed: 406181
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index ee67550..28deaff 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -4343,16 +4343,21 @@
static int fwpath_changed_handler(const char *kmessage,
struct kernel_param *kp)
{
+ int ret_status;
+
if (!wlan_hdd_inited) {
- wlan_hdd_inited = 1;
- return hdd_driver_init();
+ ret_status = hdd_driver_init();
+ wlan_hdd_inited = ret_status ? 0 : 1;
+ return ret_status;
}
hdd_driver_exit();
msleep(200);
- return hdd_driver_init();
+ ret_status = hdd_driver_init();
+ wlan_hdd_inited = ret_status ? 0 : 1;
+ return ret_status;
}
/**---------------------------------------------------------------------------