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

Commit 9d40f7f9 authored by Jingtao Chen's avatar Jingtao Chen Committed by Gerrit - the friendly Code Review server
Browse files

msm: ba: avoid system crash in msm_ba_open()



If it failed to get ba device, return NULL in msm_ba_open() to
avoid system crash on some specific board without adv7481 chip.

Change-Id: I5a3af414a683d852027b84b9ba0d64e2ee450e61
Signed-off-by: default avatarJingtao Chen <jingtaoc@codeaurora.org>
parent d33ed6b2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -830,6 +830,11 @@ void *msm_ba_open(const struct msm_ba_ext_ops *ext_ops)

	dev_ctxt = get_ba_dev();

	if (!dev_ctxt) {
		dprintk(BA_ERR, "Failed to get ba dev");
		return NULL;
	}

	inst = kzalloc(sizeof(*inst), GFP_KERNEL);

	if (!inst) {