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

Commit ff7b876f authored by Bhalchandra Gajare's avatar Bhalchandra Gajare
Browse files

ASoC: wcd_cpe_services: Fix possible NULL pointer de-reference



Fix the cpe_svc_core_cmi_handler function to perform NULL check before
accessing the parameter provided to avoid possible NULL pointer
de-reference.

CRs-fixed: 925138
Change-Id: I2a2b9b2c30bd94d97aa6ab89fa1db59650025d2f
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent bb29ea15
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -982,12 +982,12 @@ static void cpe_svc_core_cmi_handler(
{
	struct cmi_hdr *hdr;

	pr_debug("%s: event = %d\n",
		 __func__, parameter->event);

	if (!parameter)
		return;

	pr_debug("%s: event = %d\n",
		 __func__, parameter->event);

	if (parameter->event != CMI_API_MSG)
		return;