mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacmn: Ensure legacy_callback is not NULL before calling
Check legacy_callback function pointer is non NULL before calling the function Change-Id: I4953b87486214f704eaf357e663f0fbc310fb965 CRs-Fixed: 2160759
This commit is contained in:
parent
47e7416b12
commit
a7ef89abb1
1 changed files with 8 additions and 0 deletions
|
|
@ -111,6 +111,10 @@ int init_deinit_service_ready_event_handler(ol_scn_t scn_handle,
|
|||
goto free_param_and_exit;
|
||||
|
||||
legacy_callback = target_if_get_psoc_legacy_service_ready_cb();
|
||||
if (!legacy_callback) {
|
||||
err_code = -EINVAL;
|
||||
goto free_param_and_exit;
|
||||
}
|
||||
err_code = legacy_callback(wmi_service_ready_event_id,
|
||||
scn_handle, event, data_len);
|
||||
|
||||
|
|
@ -372,6 +376,10 @@ int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle,
|
|||
|
||||
wlan_objmgr_populate_ext_service_ready_data(psoc, service_param);
|
||||
legacy_callback = target_if_get_psoc_legacy_service_ready_cb();
|
||||
if (!legacy_callback) {
|
||||
err_code = -EINVAL;
|
||||
goto free_param_and_exit;
|
||||
}
|
||||
|
||||
err_code = legacy_callback(wmi_service_ready_ext_event_id,
|
||||
scn_handle, event, data_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue