mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Add null pointer check
Add null pointer check for wmi handle in CFR functions. CRs-Fixed: 2673593 Change-Id: I0993f36749f856df8849913f0338a8dc2581fa95
This commit is contained in:
parent
8a8ee00543
commit
b94338a8d7
1 changed files with 15 additions and 1 deletions
|
|
@ -49,6 +49,10 @@ int target_if_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
|
|||
return -EINVAL;
|
||||
|
||||
pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
|
||||
if (!pdev_wmi_handle) {
|
||||
cfr_err("pdev wmi handle NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
vdev = wlan_peer_get_vdev(peer);
|
||||
|
||||
qdf_mem_set(¶m, sizeof(param), 0);
|
||||
|
|
@ -92,6 +96,10 @@ int target_if_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
|
|||
int retv = 0;
|
||||
|
||||
pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
|
||||
if (!pdev_wmi_handle) {
|
||||
cfr_err("pdev wmi handle NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
vdev = wlan_peer_get_vdev(peer);
|
||||
qdf_mem_set(¶m, sizeof(param), 0);
|
||||
|
||||
|
|
@ -112,16 +120,22 @@ int target_if_cfr_pdev_set_param(struct wlan_objmgr_pdev *pdev,
|
|||
{
|
||||
struct pdev_params pparam;
|
||||
uint32_t pdev_id;
|
||||
struct wmi_unified *pdev_wmi_handle = NULL;
|
||||
|
||||
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
||||
if (pdev_id < 0)
|
||||
return -EINVAL;
|
||||
|
||||
pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
|
||||
if (!pdev_wmi_handle) {
|
||||
cfr_err("pdev wmi handle NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
qdf_mem_set(&pparam, sizeof(pparam), 0);
|
||||
pparam.param_id = param_id;
|
||||
pparam.param_value = param_value;
|
||||
|
||||
return wmi_unified_pdev_param_send(lmac_get_pdev_wmi_handle(pdev),
|
||||
return wmi_unified_pdev_param_send(pdev_wmi_handle,
|
||||
&pparam, pdev_id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue