qcacld-3.0: Add null check in action oui send request

In target_if_action_oui_send_req(), there is no NULL check against
return value of GET_WMI_HDL_FROM_PSOC() which can result in NULL
pointer exception. Therefore, add NULL check.

Change-Id: Ibbc4fdf03563496b9d5dac63141921dd8bdea4fa
CRs-Fixed: 2299793
This commit is contained in:
Rajeev Kumar Sirasanagandla 2018-08-21 20:55:25 +05:30 committed by Gerrit - the friendly Code Review server
parent e5d42d7d18
commit 80e16bfe83

View File

@ -28,10 +28,15 @@
static QDF_STATUS
target_if_action_oui_send_req(struct wlan_objmgr_psoc *psoc,
struct action_oui_request *req)
struct action_oui_request *req)
{
return wmi_unified_send_action_oui_cmd(GET_WMI_HDL_FROM_PSOC(psoc),
req);
void *wmi_hdl;
wmi_hdl = GET_WMI_HDL_FROM_PSOC(psoc);
if (!wmi_hdl)
return QDF_STATUS_E_FAILURE;
return wmi_unified_send_action_oui_cmd(wmi_hdl, req);
}
void