qcacld-3.0: Add check to avoid null pointer dereference

Add null check while calling wlan_psoc_get_qdf_dev to
avoid dereference of null pointer.

Change-Id: Ia3717238d6d81c805aef28337bb633a0f7e383dd
CRs-Fixed: 3203257
This commit is contained in:
Vulupala Shashank Reddy 2022-05-23 17:42:14 +05:30 committed by Madan Koyyalamudi
parent d9ba7017eb
commit 772875a23c

View File

@ -754,9 +754,15 @@ void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
{
struct device *dev = wlan_psoc_get_qdf_dev(psoc)->dev;
struct device *dev;
QDF_STATUS status;
if (!wlan_psoc_get_qdf_dev(psoc)) {
ipa_err("wlan_psoc_get_qdf_dev returned NULL");
return;
}
dev = wlan_psoc_get_qdf_dev(psoc)->dev;
status = ipa_config_mem_alloc();
if (QDF_IS_STATUS_ERROR(status)) {
ipa_err("Failed to alloc g_ipa_config");