mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Add NULL check for WMI handle
Adding NULL checks for WMI handle while registering or unregistering events or event handlers Change-Id: Icdf7032bad7289e62f5d7b17aab9780bcdf0ab1d
This commit is contained in:
parent
eb0e456d68
commit
46050aa104
1 changed files with 24 additions and 3 deletions
|
|
@ -1798,7 +1798,14 @@ int wmi_unified_register_event(wmi_unified_t wmi_handle,
|
|||
{
|
||||
uint32_t idx = 0;
|
||||
uint32_t evt_id;
|
||||
struct wmi_soc *soc = wmi_handle->soc;
|
||||
struct wmi_soc *soc;
|
||||
|
||||
if (!wmi_handle) {
|
||||
WMI_LOGE("WMI handle is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
soc = wmi_handle->soc;
|
||||
|
||||
if (event_id >= wmi_events_max ||
|
||||
wmi_handle->wmi_events[event_id] == WMI_EVENT_ID_INVALID) {
|
||||
|
|
@ -1848,7 +1855,14 @@ int wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
|
|||
{
|
||||
uint32_t idx = 0;
|
||||
uint32_t evt_id;
|
||||
struct wmi_soc *soc = wmi_handle->soc;
|
||||
struct wmi_soc *soc;
|
||||
|
||||
if (!wmi_handle) {
|
||||
WMI_LOGE("WMI handle is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
soc = wmi_handle->soc;
|
||||
|
||||
if (event_id >= wmi_events_max ||
|
||||
wmi_handle->wmi_events[event_id] == WMI_EVENT_ID_INVALID) {
|
||||
|
|
@ -1935,7 +1949,14 @@ int wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
|
|||
{
|
||||
uint32_t idx = 0;
|
||||
uint32_t evt_id;
|
||||
struct wmi_soc *soc = wmi_handle->soc;
|
||||
struct wmi_soc *soc;
|
||||
|
||||
if (!wmi_handle) {
|
||||
WMI_LOGE("WMI handle is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
soc = wmi_handle->soc;
|
||||
|
||||
if (event_id >= wmi_events_max ||
|
||||
wmi_handle->wmi_events[event_id] == WMI_EVENT_ID_INVALID) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue