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

Commit 712cb1f8 authored by Aravind Kumar's avatar Aravind Kumar
Browse files

ASoC: wcd9xxx: Add check for pointer before dereferencing



It is possible that irq_find_host returns a null
pointer. The change checks if the pointer is null
before derefenencing it.

Change-Id: I28c430e64a1ab7f507a2d05230039f313eedf034
Signed-off-by: default avatarAravind Kumar <akumark@codeaurora.org>
parent 5f318d6e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -596,6 +596,9 @@ wcd9xxx_get_irq_drv_d(const struct wcd9xxx_core_resource *wcd9xxx_res)
		return NULL;

	domain = irq_find_host(pnode);
	if (unlikely(!domain))
		return NULL;

	return (struct wcd9xxx_irq_drv_data *)domain->host_data;
}