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
This commit is contained in:
Jyoti Kumari 2021-03-16 15:54:14 +05:30 committed by snandini
parent 9242a10def
commit 3971742914

View File

@ -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
* 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);
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) &&
wmi_service_enabled(wmi_handle,
wmi_service_packet_capture_support)) {