qcacld-3.0: Check NULL value of wmi_handle

In target_if_register_mgmt_data_offload_event(), check NULL value of
wmi_handle before it's used by wmi_service_enabled()

Change-Id: Iea51c59770258fd10468bb439f559094b563851f
CRs-Fixed: 2900533
这个提交包含在:
Jyoti Kumari
2021-03-16 15:54:14 +05:30
提交者 snandini
父节点 04d0c0e406
当前提交 6308349a61

查看文件

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020 The Linux Foundation. All rights reserved. * Copyright (c) 2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -175,6 +175,11 @@ target_if_register_mgmt_data_offload_event(struct wlan_objmgr_psoc *psoc)
} }
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
pkt_capture_err("wmi_handle is NULL");
return QDF_STATUS_E_FAILURE;
}
if ((ucfg_pkt_capture_get_mode(psoc) != PACKET_CAPTURE_MODE_DISABLE) && if ((ucfg_pkt_capture_get_mode(psoc) != PACKET_CAPTURE_MODE_DISABLE) &&
wmi_service_enabled(wmi_handle, wmi_service_enabled(wmi_handle,
wmi_service_packet_capture_support)) { wmi_service_packet_capture_support)) {