mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Add validation code for wmi handler in dfs module
Add validation code for get_wmi_unified_hdl_from_psoc() return to avoid null pointer access. Change-Id: I05a8c135df5197356c77df4997d978c0209b0dfd CRs-Fixed: 2317012
This commit is contained in:
parent
e3d4d25f62
commit
d5a4e64886
1 changed files with 17 additions and 2 deletions
|
|
@ -173,8 +173,15 @@ static QDF_STATUS target_if_reg_phyerr_events_dfs2(
|
|||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
int ret;
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
ret = wmi_unified_register_event(get_wmi_unified_hdl_from_psoc(psoc),
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("null wmi_handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
ret = wmi_unified_register_event(wmi_handle,
|
||||
wmi_dfs_radar_event_id,
|
||||
target_if_radar_event_handler);
|
||||
if (ret) {
|
||||
|
|
@ -194,7 +201,15 @@ static QDF_STATUS target_if_reg_phyerr_events_dfs2(
|
|||
|
||||
static bool target_if_dfs_offload(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return wmi_service_enabled(get_wmi_unified_hdl_from_psoc(psoc),
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("null wmi_handle");
|
||||
return false;
|
||||
}
|
||||
|
||||
return wmi_service_enabled(wmi_handle,
|
||||
wmi_service_dfs_phyerr_offload);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue