Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 772875a2 authored by Vulupala Shashank Reddy's avatar Vulupala Shashank Reddy Committed by Madan Koyyalamudi
Browse files

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
parent d9ba7017
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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");