qcacld-3.0: Handle wlan_logging_sock_init_svc failure gracefully
Currently as part of hdd init host invokes wlan_logging_sock_init_svc. This API returns error if any memory allocation failure occurs, but in hdd_init this error case is not handled. To address this issue, add support to handle wlan_logging_sock_init_svc failure. Change-Id: I6ea90ae6c23e75f266ece22f08042b16152ae570 CRs-Fixed: 3532384
This commit is contained in:

committed by
Rahul Choudhary

szülő
a0cd2ab42d
commit
d5580e4c4c
@@ -17368,6 +17368,25 @@ static void __hdd_op_unprotect_cb(void *sync, const char *func)
|
|||||||
__osif_psoc_sync_op_stop(sync, func);
|
__osif_psoc_sync_op_stop(sync, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
||||||
|
/**
|
||||||
|
* hdd_logging_sock_init_svc() - Initialize logging sock
|
||||||
|
*
|
||||||
|
* Return: 0 for success, errno on failure
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
hdd_logging_sock_init_svc(void)
|
||||||
|
{
|
||||||
|
return wlan_logging_sock_init_svc();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int
|
||||||
|
hdd_logging_sock_init_svc(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_init() - Initialize Driver
|
* hdd_init() - Initialize Driver
|
||||||
*
|
*
|
||||||
@@ -17391,15 +17410,22 @@ int hdd_init(void)
|
|||||||
|
|
||||||
wlan_init_bug_report_lock();
|
wlan_init_bug_report_lock();
|
||||||
|
|
||||||
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
if (hdd_logging_sock_init_svc()) {
|
||||||
wlan_logging_sock_init_svc();
|
hdd_err("logging sock init failed.");
|
||||||
#endif
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
hdd_trace_init();
|
hdd_trace_init();
|
||||||
hdd_register_debug_callback();
|
hdd_register_debug_callback();
|
||||||
wlan_roam_debug_init();
|
wlan_roam_debug_init();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err:
|
||||||
|
wlan_destroy_bug_report_lock();
|
||||||
|
qdf_op_callbacks_register(NULL, NULL);
|
||||||
|
cds_deinit();
|
||||||
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user